This documentation is archived and is not being maintained.

ServiceInstaller.StartType Property

Indicates how and when this service is started.

[Visual Basic]
Public Property StartType As ServiceStartMode
[C#]
public ServiceStartMode StartType {get; set;}
[C++]
public: __property ServiceStartMode get_StartType();
public: __property void set_StartType(ServiceStartMode);
[JScript]
public function get StartType() : ServiceStartMode;
public function set StartType(ServiceStartMode);

Property Value

A ServiceStartMode that represents the way the service is started. The default is Manual, which specifies that the service will not automatically start after reboot.

Remarks

Set the StartType to specify either that the service start automatically after reboot, or that a user must manually start the service. A service can also be disabled, specifying that it cannot be started, either manually or programmatically, until it is enabled.

You cannot change ServiceInstaller property values after installation. To change the StartType, you either have to uninstall and reinstall your service, or manually change the setting using the Service Control Manager.

Requirements

Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ServiceInstaller Class | ServiceInstaller Members | System.ServiceProcess Namespace | ServiceProcessInstaller.Account

Show: