Jump to content

Can't run executables unless autoit is installed

Recommended Posts

I have created a script that simply runs an executable (exe.exe) that resides on the network....(ie. \\network\folder\).

i compile the script into an executable (ie. instead of script.au3 it is script.exe) so i assume that the executable could be run by any host on the network.

I found that when i run the script.exe from any machine apart from the one i created the script on, it cannot find the exe.exe on the network and the following error message is displayed:


Error: Unable to execute the external program.

The system cannot find the file specified.

The funny thing is that if i do the same thing on my computer it runs fine!!!????

Has anyone ever seen this???? im dying here

Link to post
Share on other sites
  • Administrators

It would normally work with a local drive but I think that setting a UNC directory as the working directory doesn't work on all OSes (I'm sure it doesn't work under 9x, can't remember about the rest).

Link to post
Share on other sites

This is in the help file:

Run ( "filename" [, "workingdir" [, flag]] )


filename The name of the executable (EXE, BAT, COM, or PIF) to run.

workingdir [optional] The working directory.

flag [optional] The "show" flag of the executed program:

@SW_HIDE = Hidden window

@SW_MINIMIZE = Minimized window

@SW_MAXIMIZE = Maximized window

You think it is obvious that "filename" should be "\\network\folder\exe.exe" rather than just "exe.exe" when the "workingdir" ("\\network\folder") specifys it aswell?? i dont. Whats the use of having "workingdir" when you have to specify the full location of the filename anyway? or dont u understand?

Link to post
Share on other sites

Actually I always understand that the filename is the full name of the .exe (.bat, .com...) with also the full path. The working dir is where you want the program starts...


Run('c:\winnt\cmd.exe /c dir>c:\list.txt',"c:\this is an\example")

Will make the command DIR in the "c:\this is an\example" copying the results in c:\list.txt

Run('c:\winnt\cmd.exe /c dir>c:\list.txt',"c:\winnt")

As you can see the filename is exatly the same, but changing the dir the output is different.

Lots of programs, GUI based overall, ignore the starting dir (that often is omitted with a "" tag). But it may be useful in command line program.

Just to know, did you ever made a .pif or .lnk file?

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...