[Wix安装程序在安装时正在移除其他产品

问题描述 投票:1回答:1

我有两种通过自定义wix安装程序安装的不同产品(A,B)。由于某种原因,当安装了A并尝试安装B时,A作为B安装的一部分被卸载,反之亦然,当安装B时,A卸载了B。

我有非常相似的WIX文件,但每个文件都有不同的产品UpgradeCode。我做了一些搜索,似乎每个人都有相反的问题,即升级未卸载他们的产品。

关于任何其他需要更改的想法,我将头撞在墙上已经好几个小时了,将不胜感激。

这是我的wix文件之一。此变量与另一个变量之间的主要区别是不同的cookiecutter变量(guid和formal_name)和“ ,”内容部分。这两个应用程序确实安装在不同的位置。

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product
        Id="*"
        UpgradeCode="{{ cookiecutter.guid }}"
        Name="{{ cookiecutter.formal_name }}"
        Version="0.1.1"
        Manufacturer="{{ cookiecutter.organization_name }}"
        Language="1033">
    <Package
            InstallerVersion="200"
            Compressed="yes"
            Comments="Windows Installer Package"
    />

    <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>

    <Property Id="ARPHELPLINK" Value="https://www.myhome.com" />
    <Property Id="ARPURLINFOABOUT" Value="Home Page" />
    <Property Id="ARPNOREPAIR" Value="1" />
    <Property Id="ARPNOMODIFY" Value="1" />

    <MajorUpgrade AllowDowngrades="yes"
                  AllowSameVersionUpgrades="no"
                  IgnoreRemoveFailure="no"
                  Schedule="afterInstallInitialize" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="AppDir" Name="{{ cookiecutter.formal_name }}">
<!-- CONTENT -->
            </Directory>
        </Directory>

        <Directory Id="ProgramMenuFolder">
            <Directory Id="ApplicationProgramsFolder" Name="{{ cookiecutter.formal_name }}"/>
            <Directory Id="DesktopFolder" Name="{{ cookiecutter.formal_name }}DesktopFolder"/>
        </Directory>
    </Directory>
        <DirectoryRef Id="ApplicationProgramsFolder">
            <Component Id="ApplicationShortcutStartMenu" Guid="*">
                <Shortcut Id="ApplicationShortcut1" Name="{{ cookiecutter.formal_name }}" Description="{{ cookiecutter.description }}" Target="[DIR_python]\python.exe" WorkingDirectory="AppDir" Arguments="app\start.py" />
                <RegistryValue Root="HKCU" Key="Software\{{ cookiecutter.organization_name }}\{{ cookiecutter.formal_name }}" Name="installed" Type="integer" Value="1" KeyPath="yes" />
                <RemoveFolder Id="CleanUpShortCut1" Directory="ApplicationProgramsFolder" On="uninstall"/>
            </Component>
        </DirectoryRef>
        <DirectoryRef Id="DesktopFolder">
            <Component Id="ApplicationShortcutDesktop" Guid="*">
                <Shortcut Id="ApplicationShortcut2" Name="{{ cookiecutter.formal_name }}" Description="{{ cookiecutter.description }}" Target="[DIR_python]\python.exe" WorkingDirectory="AppDir" Arguments="app\start.py" />
                <RegistryValue Root="HKCU" Key="Software\{{ cookiecutter.organization_name }}\{{ cookiecutter.formal_name }}DesktopFolder" Name="installed" Type="integer" Value="1" KeyPath="yes" />
                <RemoveFolder Id="CleanUpShortCut2" Directory="DesktopFolder" On="uninstall"/>
            </Component>
        </DirectoryRef>

    <Feature Id="DefaultFeature" Level="1">
<!-- CONTENTREFS -->

        <ComponentRef Id="ApplicationShortcutStartMenu"/>
        <ComponentRef Id="ApplicationShortcutDesktop"/>
    </Feature>


    <Property Id="ALLUSERS" Value="1"></Property>
</Product>

wix wix3
1个回答
0
投票

[Upgrade Code:此行为与相同的升级代码一致,请通过使用此处显示的方法列出已安装设置的所有升级代码来验证是否是这种情况:[C0 ]

MSI文件的事实:或者-或者最好-检查所涉及的实际MSI文件的How can I find the Upgrade Code for an installed MSI file?是否已安装。

[Custom Action:我想您的安装程序中可能还会有一个Custom Action,它会作为另一个安装步骤插入到安装序列中的Custom Action步骤来卸载其他产品(只有几个位置工作)。请使用Upgrade table检查您的MSI,以确定表中的内容:Orca or some other MSI toolCustom Action。请报告任何嫌疑人。

Launcher:问题的MSI不是从Upgrade启动的吗?或来自setup.exe或某些batch file


[Update:也许看看昨天的答案。至少有些相关:automated system for deployment

© www.soinside.com 2019 - 2024. All rights reserved.