How to change the Startup Type of a Service with VB.NET?

  • Thread starter Thread starter DraguVaso
  • Start date Start date
D

DraguVaso

Hi,

How do you change the Startup Type of a Windows Service with VB.NET?
When using the ServiceController you can Start and Stop a Service, but I
can't find anywhere how to change the Startup Type?

Thanks a lot in advance,

Pieter
 
Hi

You can have this code to start the service automatically :
serviceInstaller1.StartType =
System.ServiceProcess.ServiceStartMode.Automatic;

This must be added in the ProjectInstaller class.

,,,

Senthil
 
DraguVaso said:
Hi,

How do you change the Startup Type of a Windows Service with VB.NET?
When using the ServiceController you can Start and Stop a Service, but I
can't find anywhere how to change the Startup Type?

Thanks a lot in advance,

Pieter
 
Back
Top