我有一个WiX安装程序来安装和启动服务。但是,我发现的所有示例都将ServiceInstall标记放在要作为服务安装的.exe文件的文件标记的正下方。我不能这样做,因为我正在使用heat在一个单独的文件中生成文件元素。因此,我的wix脚本如下所示:
<Directory Id="INSTALLLOCATION" Name="Email Generation Service">
<Component Id="SetupService" Guid="51E78696-80E0-4CDA-8F49-902C67CB129C">
<CreateFolder />
<ServiceInstall Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="EmailGenerationService"
DisplayName="Email Generation Service"
Description="Service for generating Emails from Nexus"
Start="auto"
Account="LocalService"
ErrorControl="ignore"
Interactive="no">
</ServiceInstall>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="EmailGenerationService" Wait="yes" />
</Component>
</Directory>如何告诉WiX我要将哪个文件作为服务安装?
我使用XSLT将所有文件的KeyPath设置为no,但我想安装的文件除外,尽管所有文件都在它们自己的组件中。我现在有点不知所措:
发布于 2011-11-10 01:08:02
服务必须链接到特定的文件。这是Windows Installer的限制。因此,无论如何您都需要在EXE文件元素下创建ServiceInstall元素。
一种解决方案是对EXE文件进行硬编码,而不是让它自动生成。
https://stackoverflow.com/questions/8066577
复制相似问题