Set objShell = CreateObject(“WScript.Shell”)
strPath = Replace(WScript.ScriptFullName, 文件名, “”)
objShell.Run("runas /user:administrator " & strPath & “cmd.Bat”)
WScript.Sleep 1000
objShell.SendKeys “password{ENTER}”
WScript.Sleep 1000
注意:runas是无法传递参数的