【问题标题】:WiX bootstrapper for .NET 4.5.NET 4.5 的 WiX 引导程序
【发布时间】:2013-01-07 20:52:17
【问题描述】:

我是 WiX 的新手,并且已经构建了一个独立的安装程序。我想检测系统上是否有.NET 4.5 并提示用户安装它。我的开发环境是Visual Studio 2010,使用的是 WiX 3.7 工具集。

从我看到的一些教程中,我应该使用 WiX 3.6 Burn 或使用 Visual Studio 2010 中的 WiX 引导程序项目模板。

由于某种原因,当我安装 Wix 3.7 时,我没有引导程序模板(我不确定我是否缺少要下载的扩展程序)。

使用引导模板而不是 Burn 更好吗?有什么区别?

【问题讨论】:

  • 我看到很多关于 Burn 的引用,但我的 Wix 3.7 发行版中没有 burn.exe。

标签: visual-studio-2010 wix wix-extension


【解决方案1】:

您需要创建一个名为“Bootstrapper Project”的新项目(此模板必须在您的 Visual Studio 2010 安装中,与 Windows Installer XML 相关)。以下是非常好的带有手册的博客文章:

【讨论】:

    【解决方案2】:

    Wix 烧录,是 Wix Bootstrapper。他们是一样的东西。 Burn 只是 Wix Bootstrapper 的名称,但他们确实倾向于在称其为“wix burn”和“wix bootstrapper”之间切换。但正如我所说,它们是一回事。

    这是我的 wix 引导程序,它会检查 .net 的版本,然后在安装我的 .msi 之前下载并安装它。您需要添加对 WixNetFxExtension.dll 的引用

    <?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="MyProgramInstaller" Version="1.0.0.0" Manufacturer="myCompany" UpgradeCode="yourcodehere">
    
    <!-- here's the license statement, would suggest you update this to something more useful. -->
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
        
       
    		<Chain>
        <!-- here's the .net download installer you can change this using the following chart -->
        <!-- http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html -->
          <PackageGroupRef Id="NetFx451Web"/>
          <MsiPackage Id="myProgram" SourceFile="$(var.SolutionDir)SetupProject1/bin/Release/myProgramInstaller.msi"/>
    		</Chain>
    
        
        
    	</Bundle>
    </Wix>

    【讨论】:

    • 这是一个很好的答案。只想补充一点,如果您有一个创建 msi 的 wix 安装程序项目,您可以在引导程序项目中引用它,然后编写
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 1970-01-01
    相关资源
    最近更新 更多