Jump to content

Unable to execute the external program


Recommended Posts

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 by boogieoompa
Link to comment
Share on other sites

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")
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 by cameronsdad
Link to comment
Share on other sites

  • Developers

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

Putting 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 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

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

the 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 just

Run("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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...