我尝试使用Wix中的合并模块安装C ++ 2013可再发行组件。当我构建项目时,我可以看到安装项目的msi跳转大小以包含.msm文件。
当我运行安装程序时,它看起来并不像是可以安装redistributable。我是wix的新手(今天开始),所以我希望有人可以指出我做错了什么:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SetupProject" Language="1033" Version="1.0.0.1" Manufacturer="NewbieSystems" UpgradeCode="17EE36D8-8D77-47C0-800A-6DF02D0BC9B1">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Feature Id="ProductFeature" Title="SetupProject" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<UIRef Id="WixUI_Minimal"/>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id='MyInstall' Name='My Install'>
<Directory Id="INSTALLFOLDER" Name="My Install Test" />
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="TARGETDIR">
<Merge Id="MSVCRedist" SourceFile="Merge Modules\Microsoft_VC120_CRT_x86.msm" Language="1033" DiskId="1" />
</DirectoryRef>
<Feature Id="VCRedist" Title="Visual C++ 2013 Runtime"
AllowAdvertise="no" Display="hidden" Level="1">
<MergeRef Id="MSVCRedist"/>
</Feature>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Guid="{5C420731-6650-4109-9DD9-C3CF4038F163}">
<File Source="$(var.MyInstallTest.TargetPath)" KeyPath="yes"/>
</Component>
</ComponentGroup>
</Fragment>