Sign in to follow this  
Followers 0

RunWait() Bug? "Working Directory" not working...

2 posts in this topic

I'm currently using AutoIt v3.2.12.1 and have been scripting for quite some time but only recently noticed a problem with the RunWait() function in that it doesn't properly use the working directory. I've looked at the newest version that was just released (v3.3) in hopes that it was fixed but I didn't see that function mentioned under the 'History' section.

Here is the sample script:


$Ret = RunWait("SomeProgram.exe",$InstallDir,@SW_HIDE)

if @error <> 0 then $Ret = @Extended

;At this point $Ret will equal 2 and SomeProgram.exe will not have run or installed


This script will work (changes marked in bold):


$Ret = RunWait($InstallDir & "\SomeProgram.exe",$InstallDir,@SW_HIDE)

if @error <> 0 then $Ret = @Extended

;this will exit successfully and the program will run/install

I thought I'd point this out for future releases but if its something I'm doing wrong then please let me know.


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