2014-10-30 67 views

回答

3

隨着1.0.4版本(發佈2015年1月18日),維克斯#支持安裝Windows服務。

https://wixsharp.codeplex.com/releases/view/610843

File service; 
var project = 
    new Project("My Product", 
     new Dir(@"%ProgramFiles%\My Company\My Product", 
      service = new File(@"..\SimpleService\MyApp.exe"))); 

service.ServiceInstaller = new ServiceInstaller 
{ 
    Name = "WixSharp.TestSvc", 
    StartOn = SvcEvent.Install, 
    StopOn = SvcEvent.InstallUninstall_Wait, 
    RemoveOn = SvcEvent.Uninstall_Wait, 
}; 
相關問題