我制作了WIX安装选项,升级以便删除以前的DLL, 但是,当我进入控制面板,然后去 “添加/删除程序”部分,以前的版本仍然存在。
如何从此“添加/删除”部分删除此前一个图标?
.....
回应下面的评论 抱歉,我仍然无法使用此功能,升级时,以前的版本仍显示在“添加/删除程序”部分中, 这是一些代码
我最初确实ID为“*”,但现在我只是在进行下一次构建时更改产品ID
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
<UpgradeVersion Minimum="1.0.0"
IncludeMinimum="yes"
OnlyDetect="no"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Property="PREVIOUSVERSIONSINSTALLED" />
</Upgrade>
答案 0 :(得分:0)
要升级的版本之间的升级ID必须相同。如果要执行主要升级,如果删除以前的安装然后安装新版本,则必须更改的属性是产品ID
“*”会导致WIX生成新的guid
你想要这样的东西:
<!--Product -->
<Product Id="*" Name="$(var.Product.Name)" Language="$(var.Product.Lang)" Version="$(var.Product.Version)" Manufacturer="$(var.Product.Manufacturer)" UpgradeCode="{Replace me with a constant Upgrade Guid}">
<Package InstallerVersion="$(var.Package.InstallerVersion)" Compressed="yes" Platform="$(var.Platform)" />
<!--Condition Messages-->
<Condition Message="A newer version of $(var.Product.Name) is already installed. Exiting installation.">
<![CDATA[Installed OR NOT NEWER_VERSION_FOUND]]>
</Condition>
<!-- Upgrade Table -->
<Upgrade Id="{Replace me with a constant Upgrade Guid}">
<UpgradeVersion
Property="OLD_VERSION_FOUND"
Minimum="0.0.0.0"
Maximum="$(var.Product.Version)"
IncludeMinimum="yes"
IncludeMaximum="no"
OnlyDetect="no"
IgnoreRemoveFailure="yes"
MigrateFeatures="yes"
Language="1033" />
<UpgradeVersion
Property="NEWER_VERSION_FOUND"
Minimum="$(var.Product.Version)"
IncludeMinimum="no"
OnlyDetect="yes"
Language="1033" />
</Upgrade>
<!--Removes the old version and then installs the new version-->
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize"></RemoveExistingProducts>
<InstallExecute After="RemoveExistingProducts"></InstallExecute>
</InstallExecuteSequence>
您还应注意,您无法在每个用户之间切换,也无法在不同版本的计算机之间进行切换。