我一直在使用WIX#(wixsharp)来创建MSI,但我看不到如何安装Windows服务。我已经浏览了整个CHM文件,但我没有看到任何特定于Windows服务的内容。
TIA,
...布伦特
答案 0 :(得分:4)
从版本1.0.4(2015-01-18发布)开始,WiX#支持安装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,
};