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

Execute vbscript w/ Admin rights

Status
Not open for further replies.

kickinasp

IS-IT--Management
Dec 20, 2002
2
US
I am using Windows Management Instrumentation (WMI) to retrieve system information. I have the script fully operational and it inserts all of the data into my database just fine. The problem is that since admin privileges are required to run the WMI interface it will only work if an admin person is logged on. My script is called at login and I want to have power users run it. Is there any way run the script as a power user with admin rights. This system is on an intranet, could I pass the admin username and password and if I can are there huge security risks?

Thank you for any help I have been banging my head on my desk for a week trying to figure this out.%-)
 
You can use the 'runas' command under Windows 2000 and XP. This obviously creates a security risk, since you have to provide the credentials for the account in your script. I suppose you could use an encrypted Vbscript (.vbe) for the logon script...that would eliminate some risk.

Dana Hallenbeck
 
Thanks for the help I'll give it a shot, but on a scale of 1 to 10 how much risk would you say.
 
Let me correct myself...a vbe file is an ENCODED file, not an encrypted file. It is also easily decoded by tools readily available on the internet.

I would rate this as a large security risk, since you are sending the username and password in the script.

 
You can use a schedule task, and set it to run at system logon using an admin account.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top