Jump to content

Simple "Run" Question


Recommended Posts

So what is the difference between workingdir and dir where file is located?

I looked at the helpfile and I still understand it the same as I did before..

tried @programfilesdir @desktopdir @windowsdir and lots of others, none launched it..

in the example they just run notepad, thats not very helpful considering its an exceptional program that runs out of a directory that regular programs do not

it doesn't really help someone understand how to run anything except windows built-in apps..

Edited by myxomatosii
Link to comment
Share on other sites

are you sure that is the name of the .exe?.... then KNOW the exact directory path, or put the script into the same folder as it and use @Scriptdir..... @workingdir is just where the script is looking. default is @scriptdir

Link to comment
Share on other sites

Okay, fail search.

Lets look at the syntax.

Run ( "filename" [, "workingdir" [, show_flag[, opt_flag ]]] )

Workingdir is not used to tell AutoIt where the exe is located; rather it is used to specify where the exe is working. Google it :P

You should put the full path in "filename", yes it is missleading, but put the full path to the exe here.

And now here is an example for running a random program, where we set the working dir to the same as the exe.

Run ("C:\Path\Goes\Here\This.exe", "C:\Path\Goes\Here")

Cheers,

Brett

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