daellio

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

4 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:

$InstallDir="C:\MyTempDir"

$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

However...

This script will work (changes marked in bold):

$InstallDir="C:\MyTempDir"

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

-Dan

Share this post


Link to post
Share on other sites



Having the same problem with 3.3.12.0.

I'm not sure if this is an AutoIT bug or, my environment; I suspect either McAfee or Digital Guardian is perhaps interfering with the honoring of the working directory specified as 2nd arg to RunWait. (Why allow the specification of a working directory if it won't be honored? Makes no sense.)

Will try to get both of these products to white-list/exempt my particular program from their attention to see if one is the culprit. I have a number of scripts that I think have worked fine (honored the working directory specified) until DG was recently pushed to my PC. I will update this if I have anything of use to add.

 

 

 

Share this post


Link to post
Share on other sites

Show us en example script where you have issues with and how you have determined that it isn't setting the proper Workdir please.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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