boogieoompa Posted October 7, 2005 Share Posted October 7, 2005 (edited) I am trying to launch a program using the run command but keep getting the error "Unable to execute external program". I think it may have something to do with the fact that the program is not an .exe but a propritary program. The weird thing is the program launches fine if I go to start<run and enter the information in verbatum. The only other thing it could be is perhaps the directory I am using is on the network but I wouldn't think that would be a problem. Any suggestions? Thanks Run("\\optimus1\reflections\COMMonstart\start menu\Applications\CXS.r2w") Edited October 7, 2005 by boogieoompa Link to comment Share on other sites More sharing options...
seandisanti Posted October 7, 2005 Share Posted October 7, 2005 (edited) I am trying to launch a program using the run command but keep getting the error "Unable to execute external program". I think it may have something to do with the fact that the program is not an .exe but a propritary program. The weird thing is the program launches fine if I go to start<run and enter the information in verbatum. The only other thing it could be is perhaps the directory I am using is on the network but I wouldn't think that would be a problem.Any suggestions?ThanksRun("\\optimus1\reflections\COMMonstart\start menu\Applications\CXS.r2w")It's the space in "start menu" that's throwing you off... try doing it this way....Run('"\\optimus1\reflections\COMMonstart\start menu\Applications\CXS.r2w"')all i've done is surrounded your double quotes with single quotes.***edit***oh yeah, and you may also have issues because of the extension on the file you're running Edited October 7, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
boogieoompa Posted October 7, 2005 Author Share Posted October 7, 2005 Still didn't seem to work (same error). It appears that the path is correct because it isn't saying that it can't find it. Out of curiosity what does the single quotes do? I am not familiar with that syntax. Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted October 7, 2005 Developers Share Posted October 7, 2005 (edited) Still didn't seem to work (same error). It appears that the path is correct because it isn't saying that it can't find it. Out of curiosity what does the single quotes do? I am not familiar with that syntax.ThanksPutting the string inside single quotes doesn't do anything for you in this case. Like Larry said: run the correct program or when the file extension is associated to a program run is like:Run(@comspec & ' /c "\\optimus1\reflections\COMMonstart\start menu\Applications\CXS.r2w"','',@sw_hide) Edited October 7, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
seandisanti Posted October 7, 2005 Share Posted October 7, 2005 Still didn't seem to work (same error). It appears that the path is correct because it isn't saying that it can't find it. Out of curiosity what does the single quotes do? I am not familiar with that syntax.Thanksthe single quotes make it so the command is run including the double quotes. like if you have a file named "test 2.exe" if your justRun("test 2.exe")then windows interprets the name of the file to be "test" with a command line parameter of "2.exe" unless you surround it in double quotes, so that it recognizes the entire command as a single literal string rather than 2 tokens. surrounding the double quotes with single quotes passes the quotes too... Link to comment Share on other sites More sharing options...
boogieoompa Posted October 7, 2005 Author Share Posted October 7, 2005 @comSpec worked! Thanks for all the help and info Have a good one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now