[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1173
  • Last Modified:

c# change system service logon account information

Hi, I am would like to be able to change the logon information for a given system service.  I would like to be able to change the logon account (Username / password).  As an example I would like telnet service to run under a specified user account.  Whats the best way of going about this?

1 Solution
you will do that at service installation time. when you install a service, you tipically run the executable with the /install parameter. you also provide the user & passowrd at the command line (might be wrong about this one though). OR, if it is about your service, you can programm your service to install using anotehr user/password. OR, you can go in the services console and do it from there.
in all cases, the user to be used must have the logon as a service rights granted.
I'd consider using Windows Management Instrumentation (WMI)... it will allow you to make numerous changes to services to include the account/password


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now