[英]How to install and start a windows service with wix installer?
How can I install a windows service with WiX?如何使用 WiX 安装 Windows 服务? I already did everything on the setup to install a normal .exe but what musst I do to install and start a service?
我已经做了所有设置来安装普通的 .exe 但是我必须做什么才能安装和启动服务?
Do I only need to copy this in my product.wxs and everything will work?我只需要在我的 product.wxs 中复制它,一切都会起作用吗?
I want to install it via the Setup and set the Service to autostart on Windows Startup.我想通过安装程序安装它并将服务设置为在 Windows 启动时自动启动。 And I want to delete the Service with the Setup mean it will stop the Service and uninstall it.
我想用安装程序删除服务意味着它将停止服务并卸载它。 It would be great to if I can update the Service too with a new Setup mean it will stop the Service, uninstall it, install the new one and start it.
如果我也可以使用新的安装程序更新服务,这将是很棒的,这意味着它将停止服务,卸载它,安装新的并启动它。
Is all this possible with the Code from the answere I linked?我链接的答案中的代码是否可以实现这一切?
"Hello Service" : The markup you link to should generally work, but it is a bit involved and complex. “Hello Service” :您链接到的标记通常应该可以工作,但它有点复杂。 You can normally get away with fewer constructs.
您通常可以使用较少的构造。 Here is a full-featured, self-contained practical example on github: How to create a Windows Service MSI Installer Using WiX (I didn't actually test it, but it looks good).
这是 github 上一个功能齐全、自包含的实际示例: How to create a Windows Service MSI Installer Using WiX (我没有实际测试它,但看起来不错)。
IsWiX : Chris Painter also has a sample on how to install services: https://github.com/iswix-llc/iswix-tutorials/tree/master/windows-service IsWiX :Chris Painter 还有一个关于如何安装服务的示例: https : //github.com/iswix-llc/iswix-tutorials/tree/master/windows-service
Documentation : ServiceInstall , ServiceControl .文档: ServiceInstall 、 ServiceControl 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.