Configuring windows services through .net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you change the configuration of a windows service using .net after the service been installed? In particular, I want to ensure that a given service is set to auto-start.
 
Thanks, David. The service is SQL Agent, which we are presuming to have
already been installed independently of our own software.

We need to ensure that SQL Agent starts automatically, and want to set this
property ourselves programmatically. This is possible using the Windows
SDK, but I was hoping it can be done through .net as well.

WMI should be able to do this. Look at the System.Management namespace.
There are probably some examples somewhere, but I don't have any to give
you.
 

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