设置';诱惑者';Wix安装程序上的选项不起作用
我正在使用WiX在测试机器上安装服务。但是,当我这样做时,只有在计算机上安装它的用户才能在“添加/删除程序”控制面板选项中看到。但我想让机器上的每个用户都能看到它 我做了一些研究,发现在.wxs文件中创建安装程序时,我没有设置设置';诱惑者';Wix安装程序上的选项不起作用,wix,installation,windows-installer,Wix,Installation,Windows Installer,我正在使用WiX在测试机器上安装服务。但是,当我这样做时,只有在计算机上安装它的用户才能在“添加/删除程序”控制面板选项中看到。但我想让机器上的每个用户都能看到它 我做了一些研究,发现在.wxs文件中创建安装程序时,我没有设置AllUSERS属性 因此,我用这行代码更新了我的脚本,并创建了安装程序。但仍然只有安装了它的用户才能在控制面板中看到它 这是我创建安装程序的脚本 <?xml version='1.0' encoding='windows-1252'?> <Wix xm
AllUSERS
属性
因此,我用这行代码更新了我的脚本,并创建了安装程序。但仍然只有安装了它的用户才能在控制面板中看到它
这是我创建安装程序的脚本
<?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>
请有人看一下剧本,让我知道我做错了什么
谢谢。请尝试将
软件包的InstallScope
元素设置为perMachine
,而不是显式设置alluser
。根据文件,这一事实:
设置此值以声明包是每台计算机的
安装,需要提升权限才能安装。设定
诱惑者属性为1
因此,它应该在幕后完成所需的工作。WiX在使构建Windows Installer软件包变得越来越容易方面有着悠久的历史。互联网上有很多优秀的教程和示例,但它们往往跟不上WiX的发展。您仍然可以从中学习,但一定要检查当前文档(包括XML模式,例如通过IntelliSense),并运行WiXCop工具,以便您在新安装程序上的工作是最新的。请尝试ALLUSERS而不是ALLUSERS。我想知道为什么手动设置ALLUSERS
不起作用?这篇博客文章可能会让您了解更多信息: