lsakizada Posted March 18, 2009 Posted March 18, 2009 please help on this one. Why I am getting "Access is denied" when running this script? The output: $flag=1 TDERR read:Access is denied. The Script: #include <Constants.au3> DriveMapAdd("X:", "\\murphy\baselines\tp24_bpm_setup\nt\1225\Dvd\Windows\bpm\En", 8, "domain\username", "password") $flag = FileChangeDir("X:") ConsoleWrite("$flag=" & $flag & @CRLF) Local $foo = Run(@ComSpec & " /c setup.exe /s /forcenoreboot /qn", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $line While 1 $line = StdoutRead($foo) If @error Then ExitLoop ;MsgBox(0, "STDOUT read:", $line) If StringStripWS($line, 8) <> "" Then ConsoleWrite("STDOUT read:" & $line & @CRLF) EndIf WEnd While 1 $line = StderrRead($foo) If @error Then ExitLoop ;MsgBox(0, "STDERR read:", $line) If StringStripWS($line, 8) <> "" Then ConsoleWrite("TDERR read:" & $line & @CRLF) EndIf WEnd Be Green Now or Never (BGNN)!
weaponx Posted March 18, 2009 Posted March 18, 2009 Maybe because you have your working directory for Run() set to @SystemDir instead of "X:\".
lsakizada Posted March 18, 2009 Author Posted March 18, 2009 Thank you, thats was helpful! Be Green Now or Never (BGNN)!
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