Running Services.msc as a different User C#
- by Simon Mark Smith
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