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

Run program w/ another user's rights

Status
Not open for further replies.

MaxZak

Programmer
Oct 5, 2001
116
IT
I have to run a program (an exe) with a specific user.
I'm using the "wscript.shell" object (run method) but it executes with "SYSTEM"'s rights. I've tried to use the "runas" command, but i have to specify the password after the launch of the command...
Suggestions? Tanks
 
You can use WMI. Here's an example of starting a process:
To supply credentials, you'll use the ConnectServer method of the SWbemLocator object. Search the MSDN for examples.

Or you could create a COM DLL to interface with the Windows API. For ideas see,
Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top