Use of runas commands

xiaoxiao2021-03-05  31

See such a post in the 9CBS forum:

http://community.9cbs.net/expert/topic/3923/3923466.xml?temp=.1636927

Requirements do not require manual input password, and run the program directly with another user. Under the ICUC88 prompt, write down the following scripts, implement the requirements:

'Create Shell object set sh = WScript.CreateObject ( "WScript.Shell") WScript.Sleep 1000sh.SendKeys "runas / user: proxy / administrator cmd" WScript.Sleep 1000sh.SendKeys "{ENTER}" WScript.Sleep 1000' password Here I am empty password Sh.sendKeys "{enter}" "If you want to change to another password, this is: Sh.sendKeys" Yourpassword {enter} "WScript.sleep 1000" Replace YourPassword for your password

Save as .vbs file, such as xx.vbs. When running, you can enter: CScript xx.vbs

转载请注明原文地址:https://www.9cbs.com/read-37134.html

New Post(0)