我正在使用 WiX 在测试机器上安装服务。但是当我这样做时,只有在机器上安装它的用户才能在“添加/删除程序”控制面板选项中看到。但我想让机器上的每个用户都能看到它。
AllUSERS
我做了一些研究,并意识到在 .wxs 文件中创建安装程序时我没有设置属性。
所以我用这一行更新了我的脚本<Property Id="AllUSERS" Value="1"/>
并创建了安装程序。但仍然只有安装的用户可以在控制面板中看到它。
这是我创建安装程序的脚本。
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Importer Service' Id='PUT-GUID-HERE' UpgradeCode='PUT-GUID-HERE'
Language='1033' Codepage='1252' Version='$(var.version)' Manufacturer='Test'>
<Package Id='*' Keywords='Installer' Description="Imports data"
Manufacturer='Test' InstallerVersion='100' Languages='1033' Compressed='yes'
SummaryCodepage='1252' />
<Media Id='1' Cabinet='ImporterWebService.cab' EmbedCab='yes'
DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="Importer Web Service 1.0 Installation [1]" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="AllUSERS" Value="1"/>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='Test' Name='Test1'>
<Directory Id='INSTALLDIR' Name='Importer Service'>
<Component Id='MainExecutable' Guid='*'>
<File Id='ImporterWindowsServiceEXE'
Name='Importer.WindowsService.exe' DiskId='1'
Source='Importer.WindowsService.exe' KeyPath='yes'>
</File>
<ServiceInstall
Id="ImporterServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="Importer Service"
DisplayName="Importer Service"
Description="Imports data."
Start="demand"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no">
</ServiceInstall>
<ServiceControl Id="StartService" Stop="both" Remove="uninstall"
Name="Importer Service" Wait="yes" />
</Component>
<Component Id='FileHelpersLibrary' Guid='*'>
<File Id='FileHelpersDLL' Name='FileHelpers.dll' DiskId='1'
Source='FileHelpers.dll' KeyPath='yes' />
</Component>
<Component Id='CodeSmithDataLibrary' Guid='*'>
<File Id='CodeSmithDataDLL' Name='CodeSmith.Data.dll' DiskId='1'
Source='CodeSmith.Data.dll' KeyPath='yes' />
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="Importer Service">
<Component Id="ProgramMenuDir" Guid="*">
<RemoveFolder Id='ProgramMenuDir' On='uninstall' />
<RegistryValue Root='HKCU'
Key='Software\[Manufacturer]\[ProductName]'
Type='string' Value='' KeyPath='yes' />
</Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
<Feature Id='Complete' Title='Importer Service'
Description='The complete package'
Display='hidden' Level='1' ConfigurableDirectory='INSTALLDIR'>
<ComponentRef Id='MainExecutable' />
<ComponentRef Id='FileHelpersLibrary' />
<ComponentRef Id='CodeSmithDataLibrary' />
<ComponentRef Id='ProgramMenuDir' />
</Feature>
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
</Product>
</Wix>
有人可以看看脚本,让我知道我做错了什么。
谢谢。