WIX 程序仍然存在于控制面板的“添加/删除”部分中

发布于 2024-12-11 15:53:46 字数 680 浏览 0 评论 0原文

我设置了 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>

I made my WIX install option, upgrade so that it removes previous DLLs,
However when I go into Control Panel, and go to the
Add/Remove Programs section, the previous version is still present.

How do I remove this previous icon from this Add/Remove section?

.....

In response to the comment below
Sorry I still cant get this to work, previous versions still show in the Add/Remove Programs section when I upgrade,
Here is some code

I did have Id initially to "*" but now I just change Product ID when I make my next build

<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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爺獨霸怡葒院 2024-12-18 15:53:46

您要升级的版本之间的升级 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>

您应该另请注意,您无法在每个用户和每台计算机安装版本之间进行切换。

The upgrade id must be the same between versions that you want to upgrade. If you want to perform a major upgrade, were you remove previous installations and then install your new version, the property that must change is product id

An "*" causes a new guid to be generated by WIX

You want something like this:

<!--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>

You should also note that you cannot switch between per user and per a machine installs between versions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文