使用 msi 安装程序安装 Windows 服务

pee*_*eer 2 c++ windows windows-installer

我是 Windows 安装程序的新手。我需要一个用纯 C++(无 .NET)编写的 Windows 服务的 .msi 安装程序。我听说这是可能的,但我不知道如何实现。

有人可以告诉我如何让安装程序安装我的服务吗?它需要是一个 .msi 安装程序。

谢谢!

Rob*_*ing 5

在 WiX 工具集中,您只需添加到Component包含File服务可执行文件的文件中:

<ServiceInstall Id="MyService" Name="MyService" DisplayName="My Cool Service" 
                Description="Description of my cool service." 
                Start="auto" Type="ownProcess" />
Run Code Online (Sandbox Code Playgroud)