Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The run/start method doesn't always work - for example it simply opens a command window for me. The same applies to ".htm" files that are not in my current directory.
If you can identify the application path and explicitly execute it you will find it is a more reliable solution for general deployment.
doc, on the other hand. someone has default application for viewing some type of files and with your style of code you force them to ms appies instead. tell me, I'm wrong...
Yes, quite true but in this case it would be highly unlikely that a user was not using PowePoint.
One could do a check on the association as well and see if it was even an associated file and to what application and then decide if you want to allow that application to run or if you're going to force another one.
Registered: 2003-01-01
Posts: 77
Loc: Indian Head, Maryland, USA
So many replies since Christophe's its old news now but I think:
Code:
run '%comspec% /c start "'+ $pptfile +'"'
... will open a command window because the Start command wants to interpret the string in the first set of quotes it finds as a title. The following will work:
Code:
run '%comspec% /c start '+'"Some PPT Show" '+'"'+$pptfile+'"'