3
votes

Is it possible to include a Msi package into the bootstrapper but not any of it's external files?

So my msi installer has a file:

<Component Directory="INSTALLDIR">
    <File Id="DatabaseBackup"
          Name="Database.bak"
          Source="Database.bak"
          Compressed="no" />
  </Component>

which outputs:

  • Installer.msi
  • Database.bak

Now if I set the burn chain to include the msi package:

<MsiPackage SourceFile="$(var.Installer.TargetPath)" />

the "Database.bak" file is also compressed into the resultant exe. Is it possible to compress the msi but not the .bak file?

If not can someone answer this question better than I can then I won't need to do this at all! :)

1

1 Answers

4
votes

I've used the Payload element for this purpose... in your example I would change the MsiPackage element to:

<MsiPackage SourceFile="$(var.Installer.TargetPath)" >
  <Payload Compressed="no" SourceFile="{path_to_bak_file}\Database.bak"  />
</MsiPackage>

The MSI then picks up the file and uses it as expected.

I haven't found a way to make this conditional or flexible.. in my case it's a config file that is not critical, but my setup now fails (first opens up a file open dialog looking for that file) if the file is missing - of course this depends on the details of the MSI I've created.

Hope this helps