Wix Burn会自动取消

时间:2016-10-26 18:49:50

标签: wix burn wix3.10

我有一个非常简单的Burn引导程序,它安装Visual Studio 2015 Redistributable,然后运行我们的应用程序安装程序(使用Wix创建)。在安装过程中,安装可再发行组件后,会自动弹出一个对话框,询问我是否要取消(即,如果单击“取消”按钮,会发生同样的事情)。

我已经创建了几个使用相同模式的其他安装程序,但从未见过这个问题。下面是简化的安装程序,删除了一些识别信息:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?define ProductVersion = "1.0"?>
<?define Manufacturer = "XXXX, Inc."?>

<?if $(var.Platform) = x64 ?>
    <?define VCRedistExe = "vc_redist.x64.exe"?>
<?else?>
    <?define VCRedistExe = "vc_redist.x86.exe"?>
<?endif?>

<Bundle Name="$(var.ProductName)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)" Condition="VersionNT >= v6.0">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
        <bal:WixStandardBootstrapperApplication LicenseFile="$(var.AssetsPath)\License.rtf" SuppressOptionsUI="yes"/>
    </BootstrapperApplicationRef>

    <Chain>
        <PackageGroupRef Id="redist"/>

        <MsiPackage SourceFile="$(var.MsiPath)" DisplayInternalUI="no"/>
    </Chain>
</Bundle>

<Fragment>
    <PackageGroup Id="redist_vc140">
        <ExePackage Id="vc140" DisplayName="Visual C++ 2015 Redistributable" Cache="no" PerMachine="yes" Permanent="yes" Vital="yes" Compressed="yes" SourceFile="resources/$(var.VCRedistExe)" InstallCommand="/install /quiet /norestart" Protocol="burn">
            <ExitCode Value="3010" Behavior="forceReboot"/>

            <!-- Ignore "Newer version installed" error -->
            <ExitCode Value="1638" Behavior="success"/>
        </ExePackage>
    </PackageGroup>
</Fragment>

<Fragment>
    <PackageGroup Id="redist">
        <PackageGroupRef Id="redist_vc140"/>
    </PackageGroup>
</Fragment>
</Wix>

1 个答案:

答案 0 :(得分:1)

我相信你应该删除以下退出代码,因为没有必要安装你的软件包。可能与您的bootstrapper安装相冲突。

        <ExitCode Value="3010" Behavior="forceReboot"/>

希望这能帮到你!