3

我一直在使用 WIX# (wixsharp) 创建 MSI,但看不到如何安装 Windows 服务。我浏览了整个 CHM 文件,但没有看到任何特定于 Windows 服务的内容。

TIA,

布伦特...

4

1 回答 1

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,
};
于 2015-01-22T12:04:23.017 回答