Change a Windows Service Startup type

  • Thread starter Thread starter Guest
  • Start date Start date
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...
 
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...
 
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...
 
Back
Top