Jump to content

working directory


vickerps
 Share

Recommended Posts

Hi this in relation to another post but kind of a seperate question so here goes

when you use run(C:\windows\notepad.exe)

if a working directory is not supplied like (above) what does autoit use as default? does it set the working directory to where script was started from?

If so can this be changed so that the working directory by default is the location path of exe being kicked of?

Link to comment
Share on other sites

Thanks neofox

I thought as much. however i need a way of making the work directory the same as the file being kick off without supplying it.

for example i have a program that looks to a ini file for things to run. The list could include anything eg.

Action.ini

[Action]

Run1=c:\windows\notepad.exe

Run2=C:\name\bob.exe

....

...

..

.

Run999=C:\somthingelse.exe

Some programs being run require the working directory to be where program originates from example "c:\name\bob.exe" needs a working directory of C:\name\ where as C:\somthingelse.exe needs it working directory as c:\

Because i wouldn't know this in advanced (I don't know what is being run) I need a way for autoit to default the working directory to where the file lives and not where the script is being call from.

A simple .bat appears to work in this manner however i don't want to use a .bat file I want to use autoit :)

I hope this makes sense.

Can anyone help?

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