Jump to content

How to execute application on map drive


Recommended Posts

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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