随着 .NET Core 3 的新版本,我正在尝试使用新的工作服务模板制作 Windows 服务。我需要能够使用组策略安装它,而 WiX 似乎是这项工作的工具。
我已经创建了 .wxs 文件并且没有指定 ServiceInstall 部分,它安装得很好。
这是我的文件:更新
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SystemInformationService" Language="1033" Version="1.0.0.0" Manufacturer="MyCompany" UpgradeCode="f08191cf-461e-481b-a2a1-6f54d6ae5331">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<!-- Embed cab files, don't include them in the output -->
<MediaTemplate EmbedCab="yes"/>
<!-- Default WiX dialog set -->
<UIRef Id="WixUI_Mondo" />
<!-- License agreement -->
<WixVariable Id="WixUILicenseRtf" Value="LicenseAgreement.rtf" />
<Feature Id="ProductFeature" Title="SystemInformationService.Setup" Level="1">
<ComponentGroupRef Id="ProductComponents" /> …Run Code Online (Sandbox Code Playgroud)