Using Shell Command To Open App In Windows
Posted: Tue Jan 18, 2011 4:50 am
Greetings All,
I am trying to open an app in Windows with the shell command. Here is my code:
get shell("c:\Program Files\myAppName")
When I run the code, a console window titled "C:WINDOWS\system32\cmd.exe" opens for a split second and then closes returning the result "1".
I suspect that the trouble lies with the SPACE between the word "Program" and "Files" in the path name. What I may be doing in this scenario is sending "c:\Program" with the parameter "Files\myAppName". I've tried putting the path name into variable XX and running "get shell(XX)", but I get the same results.
I eventually do want to send a parameter with this command, but I first have to figure out how to get the program to open. How does one format a pathname that uses a SPACE in a shell command? Can anyone help?
Please don't suggest using the "launch" command. This does work to open the program, but it doesn't allow me to send a parameter.
Thanks for your help,
John Miller
I am trying to open an app in Windows with the shell command. Here is my code:
get shell("c:\Program Files\myAppName")
When I run the code, a console window titled "C:WINDOWS\system32\cmd.exe" opens for a split second and then closes returning the result "1".
I suspect that the trouble lies with the SPACE between the word "Program" and "Files" in the path name. What I may be doing in this scenario is sending "c:\Program" with the parameter "Files\myAppName". I've tried putting the path name into variable XX and running "get shell(XX)", but I get the same results.
I eventually do want to send a parameter with this command, but I first have to figure out how to get the program to open. How does one format a pathname that uses a SPACE in a shell command? Can anyone help?
Please don't suggest using the "launch" command. This does work to open the program, but it doesn't allow me to send a parameter.
Thanks for your help,
John Miller