Shellexecute is always on best service.It runs the program pointed mandatory with its associated application if it exists
otherwise it dont work and the API returns a code error
if successfull result returned is >=32 otherwise it fails.
note this use the "open" option of the API.
another options as "print",....might dont work (see the returned code always).
it works if i remember for txt files only.
its preferable than to use "run/n"
to find the application associated capable to run any file you can use the API findexecutable:
http://www.news2news.com/vfp/?example=138Note : i use shellexecute to run the windows10 Modern UI appications...as Reader,news,sport...
can see examples in my blog
http://yousfi.over-blog.com/2015/08/the-modern-ui-app-windows-reader-win8-1-win10.htmlhttp://yousfi.over-blog.com/2015/08/a-custom-metro-apps-application-in-systray.htmlanother option is to use wscript.shell. run application (if script host enabled):
local m.x,loshell
m.x="%windir%\explorer.exe Godmode.{ED7BA470-8E54-465E-825C-99712043E01C}"
loshell=createobject("wscript.shell")
loShell.run(m.x)
release loshell
loShell=null
retu
can read :http://ss64.com/vb/run.html