Templates Tagged "windows"

template icon

Run a program as a specific user...

February 16, 2012Launch files as a specific user. Sample: set WshShell = WScript.CreateObject("WScript.Shell") WshShell.run "runas /user:Administrator ""C:\Program Files\Internet Explorer\iexplore.exe""" 'Open command prompt WScript.Sleep(1000) WshShell.SendKeys("AdminPassword") 'send password WshShell.SendKeys("{ENTER}") 'send enter keystroke WScript.Sleep(1000) set wshshell = Nothing Launches IE as a Administrator.