Jump to content

Recommended Posts

Posted

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.

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...