Running Services.msc as a different User C#

Posted by Simon Mark Smith on Stack Overflow See other posts from Stack Overflow or by Simon Mark Smith
Published on 2010-03-26T09:31:33Z Indexed on 2010/03/26 9:33 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

Hi, I have a requirement to create a simple windows forms application that allows an admin user to manage the Services on remote servers. We don't want to give the admins the usernames and passwords to the servers so these will be encrypted and stored in a database.

My question is whether or not it is possible to spawn a Services.msc window when impersonating one of the users stored within the database?

I have looked at the ProcessStartInfo class but because Services.msc is not an executable it does not seem to like executing this. Any ideas on a simple way of doing the actual impersonation and loading of Services.msc - say off a button click?

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about runas