如何在WIX中使用msi/Setup.exe包含先决条件 [英] How to include prerequisites with msi/Setup.exe in WIX

查看:95
本文介绍了如何在WIX中使用msi/Setup.exe包含先决条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图将我的程序包合并到一个安装EXE文件中,然后将其上传到Internet.

I'm trying to combine my package in a single setup EXE file and upload it to the Internet.

我创建了一个Microsoft Bootstraper,其中包含带有项目 MSI 输出的Setup.exe,并且-必要.NET Framework 2.0, Windows Installer 3.1, 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,并使用了MSI文件和Visual Studio中的依赖项来创建了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 ="ReportViewer\ReportViewer.exe"
                Compressed ="yes"
                Vital ="no"
                Permanent ="yes"/>
            <ExePackage
                SourceFile ="vcredist_x86\vcredist_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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆