【问题标题】:Wix Toolset MsiPackage PrereqWix 工具集 MsiPackage Prereq
【发布时间】:2013-06-14 14:19:30
【问题描述】:

我正在尝试使用 WiX 引导程序安装 prereqs。问题是,prereq 是 MSI,如果未安装,则需要从远程 URL 下载。如果我使用 ExePackage 元素,它将失败,说明 msi 不是有效的 Win32 应用程序,但如果我使用 MsiPackage 元素,编译将失败:

Unable to read package ''. 
This installation package could not be opened. Verify that the package exists 
and that you can access it, or contact the application vendor to verify that 
this is a valid Windows Installer package.

这是我正在使用的示例 MsiPackage 元素:

  <MsiPackage 
       Id="ReportViewer2012Installer" 
       Name="ReportViewer.msi" 
       Compressed="no"
       Cache="no" 
       Permanent="yes" 
       Vital="yes" 
       DownloadUrl="http://go.microsoft.com/fwlink/?LinkID=217022" 
       InstallCondition="NOT ReportViewer2012Installed" 
       SuppressSignatureVerification="yes">
           <RemotePayload 
                Description="Report Viewer 2012 Setup"
                Hash="D80B972F7CBFEEB5AF5295890B5652D080286F89" 
                ProductName="Report Viewer 2012" 
                Size="7610368" Version="11.0.0.0" />
  </MsiPackage>

有人知道我做错了什么吗?

【问题讨论】:

    标签: wix wix3


    【解决方案1】:

    您使用的DownloadUrl 不是实际的下载 URL。它被重定向(HTTP 状态 302)到

    http://download.microsoft.com/download/F/B/7/FB728406-A1EE-4AB5-9C56-74EB8BDDF2FF/1033/x86/ReportViewer.msi
    

    改为使用它。

    您可以通过导航到原始 URL,然后查看您的网络浏览器的下载历史来找到这一点。它应该显示下载时使用的实际 URL。对于更技术性的方法,它将位于响应标头中,您可以使用 Web 浏览器开发人员工具(通常在浏览器中使用 F12 打开)查看。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多