Run an application as administrator from a limited user account windows 7 vbscript

1. You need the hostname of the computer.
2. You need to activate the system administrator account and create password.
cmd#net user administrator /active:yes
3. Any questions comment below or reach me at twitter.
4. I hope that helps.

Here is the full script:

set WshShell = WScript.CreateObject(“WScript.Shell”)
dim a
a=”D:New folderapplication.exe” “runas /user:computernameAdministrator ” & chr(34) & a & chr(34)
WScript.Sleep 1000
WshShell.SendKeys “password” ‘send password
WshShell.SendKeys “{ENTER}”
WScript.Sleep 1000

Leave a Comment