gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 04:08:06 26 4
gpt4 key购买 nike

我一直在使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com