如何在 WIX 中使用 msi/Setup.exe 包含先决条件 [英] How to include prerequisites with msi/Setup.exe in WIX
问题描述
我正在尝试将我的包合并到一个安装 EXE 文件中并将其上传到 Internet.
I'm trying to combine my package in a single setup EXE file and upload it to the Internet.
我创建了一个 Microsoft 引导程序,其中包含带有项目 MSI 输出的 Setup.exe,并且预- 必要的 .NET Framework 2.0,Windows 安装程序 3.1,Visual C++ 2005 可再发行组件和 Microsoft ReportViewer.我使用 Visual Studio 2008 创建了一个安装项目.
I have created a Microsoft bootstrapper that contains Setup.exe with project MSI output, and pre-requisite .NET Framework 2.0, Windows Installer 3.1 , Visual C++ 2005 redistributables, and Microsoft ReportViewer. I have created a setup project using Visual Studio 2008.
现在我正在尝试使用 WiX 3.6 创建单个压缩设置.我已将其安装在 Visual Studio 2008 中.
Now I'm trying to create a single compressed setup using WiX 3.6. I have installed it in Visual Studio 2008.
我已使用以下命令附加了 setup.exe 和 MSI 文件.
I have attached the setup.exe and MSI file using following commands.
<ExePackage SourceFile ="setup.exe" Compressed ="yes"/>
<MsiPackage SourceFile ="myproject.msi" Compressed ="yes" />
但是找不到MSI文件.如何将上述先决条件包含在内?
But it is unable to find the MSI file. How can I include the above prerequisites with it?
或者我可以在安装时从 Internet 下载上述先决条件吗?我该怎么做?
Or can I download the above prerequisites from the Internet while installing? How do I do it?
推荐答案
我已从 Visual Studio 中删除默认的 setup.exe
并使用 Visual Studio 中的 MSI 文件和依赖项来创建 WiX 3.6引导程序:
I have removed the default setup.exe
from Visual Studio and used the MSI file and dependencies from Visual Studio to create a WiX 3.6 Bootstrapper:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="My Application"
Version="1.0"
IconSourceFile ="E:logo.ico"
Manufacturer="My company"
UpgradeCode="4dcab09d-baba-4837-a913-1206e4c2e743">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="E:License.rtf"
SuppressOptionsUI ="yes"
LogoFile ="logo.ico" />
</BootstrapperApplicationRef>
<Chain>
<ExePackage
SourceFile ="ReportViewerReportViewer.exe"
Compressed ="yes"
Vital ="no"
Permanent ="yes"/>
<ExePackage
SourceFile ="vcredist_x86vcredist_x86.exe"
Compressed ="yes"
Vital ="no"
Permanent ="yes"/>
<MsiPackage
SourceFile ="MySetup.msi"
Compressed ="yes"
DisplayName ="My Application"
ForcePerMachine ="yes"/>
</Chain>
</Bundle>
</Wix>
它压缩成一个带有先决条件的单个 EXE 文件.
It compresses into an single EXE file with prerequisites.
这篇关于如何在 WIX 中使用 msi/Setup.exe 包含先决条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!