Change a Windows Service Startup type

G

Guest

Is there a way to change a Service's startup type somewhere in the .net
framework?

I've been messing around with the System.ServiceProcess namespace which
allows me to start, stop and pause services however if the service's
startup type is set to "Disabled" there is no way for me to change it
to Automatic or Manual... attempting to start a disabled service
results in exceptions (i.e. ServiceController.Start).


Thanks in advance...
 
J

John Bailo

Isn't that an installer property?
Is there a way to change a Service's startup type somewhere in the .net
framework?

I've been messing around with the System.ServiceProcess namespace which
allows me to start, stop and pause services however if the service's
startup type is set to "Disabled" there is no way for me to change it
to Automatic or Manual... attempting to start a disabled service
results in exceptions (i.e. ServiceController.Start).


Thanks in advance...
 
G

Guest

Well it looks like the ServiceInstaller Class allows you to install your own
service and set the startup type, however I'm looking to start up a Microsoft
service that already exists and is disabled by default; not sure I can use
the Service installer to do that but will check it out.

In the mean time, if anyone has any other ideas please let me know.

Thanks John...
 

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

Top