wixsharp - 我可以使用 Wixsharp 安装 Windows 服务吗

标签 wixsharp

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

TIA,

布伦特...

最佳答案

从 1.0.4 版(2015 年 1 月 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,
};

关于wixsharp - 我可以使用 Wixsharp 安装 Windows 服务吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26642909/

相关文章:

c# - WixSharp 注入(inject)多个自定义 CLR 对话框

c# - Wixsharp 如何引用自定义 Action 项目

c# - 根据权限设置默认安装目录

action - WixSharp - 指定 ManageAction 在存在多个时运行的顺序

c# - 使用 Wix# 构建 MSI 的递归 DirFiles

c# - 如何使用WixSharp在ProgramFiles64Forder下安装多个子目录?

c# - 构建后事件在使用 Wix Sharp 在 Visual Studio 中构建 MSI 之前执行

wix - 使用 WixSharp 进行 IniFileSearch