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

RunAs Command

$
0
0
Can anyone help me with this?  I have a script and I'm trying to run with admin rights.  I'd like to script everything in AutoIT but right now I'm calling a batch file...is there a way to run a command to launch a msi as an administrator.  This is what I have:

Local $sUser = "username"
Local $sPass = "password"
Local $sDomain = "domain"
Local $sCMD = "netsh interface ipv4 set subinterface"
RunAs ($sUser, $sDomain, $sPass, 0, "Source Script Files\Leagacy.bat " & $sCMD)

I can't get the script to run with Admin rights...can someone help point me in the right direction?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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