Abbas Posted July 15, 2011 Posted July 15, 2011 I have the following script to execute a command file $rc = Run("c:\temp\test3.bat", "%TEMP%", @SW_MINIMIZE) ConsoleWrite($rc & " - " & @error & " - " & @extended & @crlf) when i run this code with Windows 7 64-Bit i get the following result line 0 - 1 - 267 (rc=0, error=1, extended=267) The command will not start. If i change the script (replacing %temp% with @TempDir) to $rc = Run("c:\temp\test3.bat", @TempDir, @SW_MINIMIZE) ConsoleWrite($rc & " - " & @error & " - " & @extended & @crlf) it will work fine and runs the command file. I guess it has something to do with the permission control in Windows7. Does anybody knows this issue ? What does the extended error 267 mean ? Thanks for any help.
JohnOne Posted July 15, 2011 Posted July 15, 2011 I'm not a 100% on this, but I think it might have something to do with ExpandVarStrings (Option) / ExpandEnvStrings (Option). You can find those in the helpfile. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Abbas Posted July 15, 2011 Author Posted July 15, 2011 ok i'm feeling stupid now I forgot to add Opt("ExpandEnvStrings", 1) ;0=don't expand, 1=do expand Opt("ExpandVarStrings", 1) ;0=don't expand, 1=do expand to my example script. However it is still not working on this one machine (on other it does work).
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now