Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

RunAs not working with file on a network share

$
0
0
Pretty simple issue. v3.3.8.1

I set up a script to run a few of our office programs as an admin. All of the locally installed programs (on the C drive) worked flawlessly, however running the exact script but on a program on our network (S drive) gives me an error. Here is the script:


Local $sUserName = "admin"
Local $sPassword = "***"

RunAs($sUserName, @ComputerName, $sPassword, 1, "S:\test.bat", @SystemDir)

If @error = 1 Then
MsgBox(4096, "Error", "Something went wrong, but I'm not sure why...")
EndIf


I've tried every option for the logon flag and the working directory. Does the RunAs function just not work on network shares?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>