Hello!
Can someone offer some advice as to why this process is coming back as failed when it appears to be successful? This is a process that needs to run under a non-administrative user account.
The test message output = 0 and the results message comes back as [Failure], but a copy of the file is created.
Before:
usbstor.inf
After:
usbstor.inf
usbstor.inf.old
I'm sure this is just a simple brain freeze on my end but I don't want to push forward without understanding the output.
Thanks!
Can someone offer some advice as to why this process is coming back as failed when it appears to be successful? This is a process that needs to run under a non-administrative user account.
[ autoit ]
$sUserName = "XXXXX" $sPassword = "XXXXX" Global $FileCopyINF $FileCopyINF = RunAsWait($sUserName, @ComputerName, $sPassword, 0, FileCopy("C:\Windows\INF\usbstor.inf", "C:\Windows\INF\usbstor.inf.old", 1), @SystemDir, @SW_HIDE) ;test output MsgBox(0, "Test", "Returned value for $FileCopyINF: ", $FileCopyINF) If $FileCopyINF = 0 Then $CopyValueINF = "Failure" Else $CopyValueINF = "Success" EndIf MsgBox(0, "File Copy Results", 'Results of the File "Copy" process...' & @CRLF & @CRLF & " C:\Windows\INF\usbstor.inf................Rename to: usbstor.inf.old [" & $CopyValueINF & "]") Exit
The test message output = 0 and the results message comes back as [Failure], but a copy of the file is created.
Before:
usbstor.inf
After:
usbstor.inf
usbstor.inf.old
I'm sure this is just a simple brain freeze on my end but I don't want to push forward without understanding the output.
Thanks!