Sign in to follow this  
Followers 0
DMitch

Cannot find .exe files

5 posts in this topic

I'm trying to use the Run function to open two different applications in my script and get the following error:

Error: Unable to exectue the external program

The system cannot find the file specified

I've double checked the link and its good, and neither of the files are hidden/system or anything like that in the properties. I can run other .exe files in the same folder, so I don't think its any type of folder option that is causing the error. I can work around the issue by using the MouseClick function and double-clicking the icon, but I want to be able to use @SW_MAXIMIZE to open the programs in the full window. Is there something that the developer of a .exe file can do to make AutoIt not see it? If so, is there a way around it using the Run function?

Here's the code I used:

Run ("DBMngr.exe", "C:\Winsei\sei", @SW_MAXIMIZE)

DMitch

Share this post


Link to post
Share on other sites



Try: Run("C:\Winsei\sei\DBMngr.exe","C:\Winsei\sei",@SW_MAXIMIZE) :)

Share this post


Link to post
Share on other sites

Try: Run("C:\Winsei\sei\DBMngr.exe","C:\Winsei\sei",@SW_MAXIMIZE) :)

Thanks, that was it! Any idea why sometimes you have to give the full path with the filename, even when you provide the path right after, and sometimes you don't?

Share this post


Link to post
Share on other sites

The path to executable is not necessarily the same as the working

directory. Also, the example in the helpfile - with notepad -

tends to put people on the wrong foot, because it is in a directory

in the %path%, so it does not need the full path.

Share this post


Link to post
Share on other sites

The path to executable is not necessarily the same as the working

directory. Also, the example in the helpfile - with notepad -

tends to put people on the wrong foot, because it is in a directory

in the %path%, so it does not need the full path.

Got it. Thanks again for the quick help.

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