Visual studio
If you create an installation project using VS, you can create a custom action that called the .NET method to start the service. But in fact, it is not recommended to use managed user actions in MSI. See page .
ServiceController controller = new ServiceController(); controller.MachineName = "";
InstallShield or Wise
If you use InstallShield or Wise, these applications provide the ability to run the service. For example, with Wise, you need to add a service control action. In this step, you indicate whether you want to start or stop the service.
Wix
Using Wix, you need to add the following xml code under your service component. For more information about this, you can check this page .
<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes" Name="" DisplayName="" Description="" Start="auto" Account="LocalSystem" ErrorControl="ignore" Interactive="no"> <ServiceDependency Id="????"/>
Francis B. Jul 28 '09 at 17:38 2009-07-28 17:38
source share