Sign in to follow this  
Followers 0
boogieoompa

Unable to execute the external program

6 posts in this topic

#1 ·  Posted (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 by boogieoompa

Share this post


Link to post
Share on other sites



#2 ·  Posted (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")
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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#4 ·  Posted (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.

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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...


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

@comSpec worked! Thanks for all the help and info ;)

Have a good one.

Share this post


Link to post
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
Sign in to follow this  
Followers 0