Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runas command to modify system path

Status
Not open for further replies.
Dec 8, 2003
56
US
does anyone know the correct way to add runas to a script. i need to update the system environment path and this can only be done logged on as admin.
 
Can't you just shell it?

Set SH = CreateObject("WScript.Shell")
SH.Run "%comspec% /c %systemroot%\system32\runas.exe /user:domain\username blah blah blah..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top