Change Username/Password for an existing Windows Service

  • Thread starter Thread starter Scott Lezberg \(Deltek\)
  • Start date Start date
S

Scott Lezberg \(Deltek\)

Does anyone have any sample code on how to change a username/password for an
existing Windows service?

Thanks

Scott
 
On windows XP, you can use the "sc" command line utility, such as:

sc config MyService obj= UserName password= newPassword

You can use Process.Start to run this command.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top