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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript with "RUNAS" command builtin

Status
Not open for further replies.

RasmusHolt

IS-IT--Management
Jun 21, 2005
1
DK
Hi, We have a program that we need to run in the users login script. The program needs to run with adminisrative rights. Is it possible to make a vbscript with a "runas" command with username and password from a user with administrative rights builtin the script. Please give me an example of how a script like this might look.
Thank you.
 
Can't you use a startup script instead of a login script ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hello. I've come across some shareware, non-interactive runas binaries. Also, have put together own custom runas routine with VB calling Win32 API function called CreateProcessWithLogon. It's somewhat involved and if you script it, then be sure not to allow persons to read script where administrative password is stored.

Good luck.

Adam Cox
Programmer/Analyst

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top