简体   繁体   中英

How to force a WiX bootstrapper to download an MSI package?

I'm reading this section of WiX toolset manual , and wondering, how to force WiX bootstrapper to download an MSI package? For example, before installing my application, the bootstrapper has to download and install:

  • .NET Framework Client Profile
  • SQL Server 2008 R2 Shared Management Objects.

I've thought, I can describe corresponding MsiPackage like this:

but the schema reference for MsiPackage element tells, that

"At a minimum, the SourceFile or Name attribute must be specified."

And, of course, it doesn't lie - without SourceFile or Name the bundle project compiles with errors.

Adding RemotePayload to MsiPackage like this:

  <MsiPackage Name="redist\SharedManagementObjects.msi"
              DisplayName="Microsoft SQL Server 2008 R2 Management Objects"
              DisplayInternalUI="yes"
              Vital="yes"
              DownloadUrl="http://go.microsoft.com/fwlink/?LinkID=188438&amp;clcid=0x409">
    <RemotePayload Size="10953728"
                   Version="10.50.1600.1"
                   ProductName="Microsoft SQL Server 2008 R2 Management Objects"
                   Description="Microsoft SQL Server 2008 R2 Management Objects"
                   Hash="6ce3a433309c63d98bcf0e2b9f1dfaed8cc18783"/>
  </MsiPackage>

causes an build error:

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.

Am I missing something?

Similar question answered here :

That's not supported today; RemotePayload supports only the fields needed to verify a downloaded file is what's expected but nothing more than that. That works for .exes because Burn treats those like black boxes. Burn gathers a lot more data from MSI packages.

So the bug is either that it's an allowed child of MsiPackage or that it doesn't yet support all the data needed from an MSI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM