
Here is a procedure and code using generated ProjectInstaller in Visual Studio: ServiceController sc = new ServiceController("Windows Automatic Start Service") Private void ServiceInstaller_AfterInstall(object sender, InstallEventArgs e) ServiceInstaller.AfterInstall += ServiceInstaller_AfterInstall ServiceInstaller.ServiceName = "Windows Automatic Start Service" ServiceInstaller.StartType = ServiceStartMode.Automatic Service will have Automatic Start Type ProcessInstaller.Account = ServiceAccount.LocalSystem ProcessInstaller = new ServiceProcessInstaller() Private readonly ServiceProcessInstaller processInstaller Public partial class ServiceInstaller : Installer After refactoring a little bit, this is an example of a complete windows service installer with automatic start: using System.ComponentModel
