3

My build system creates a MSI using Wix, it then uses WIX to bundle that into another EXE that acts as a bootstrapper. The bootstrapper makes sure all the dependencies are installed (.NET and so forth).

I would like to change some properties inside the MSI depending on who downloads it. I won't know the settings until long after the build is complete.

I am able to do that with the MSI by editing the properties DB. However when I try the same technique with the bundle, it (WIX interop libarary) says it can't open the file.

So, how can I do one of these things:

  1. Edit a property inside the WIX bundle EXE (that I can then pass to the bundled package)
  2. Extract and re-insert the bundled MSI
Robert Wagner
  • 17,515
  • 9
  • 56
  • 72

1 Answers1

3

You can pass properties using commandline to wix bundle. The bundle then can pass the property to MSI.

WiX Bootstrapper: How do I set burn variables from the command line?

Pass parameters from bootstrapper to msi bundle package

The other solution I can think of: If you write your own custom bootstrapper, you'll have access to IBootstrapperEngine::SetVariable, and you can do whatever you want with that, including setting properties that MSI can read. https://wixwpf.codeplex.com/ should be pretty easy.

If you are asking if there is such tool like orca.exe for Wix burn, then I would say no.

Potential options:

  • Generate wix burn installer on the fly (including compilation)
  • Split up executable: set the Compressed attribute to "no". You'll have access to *.msi then.
Community
  • 1
  • 1
Erti-Chris Eelmaa
  • 25,338
  • 6
  • 61
  • 78
  • I want to bake the variable into the MSI/exe that the customer downloads from the website so that it contains customer specific settings. – Robert Wagner Jan 12 '15 at 23:00
  • @RobertWagner "uses WIX to bundle that into another MSI that acts as a bootstrapper" suggests that you aren't using a WiX Bootstrapper. If you were to switch to that, Chris's answer would make a lot of sense. – Tom Blodget Jan 15 '15 at 13:50
  • @TomBlodget I am using WIX to create that bootstrapper – Robert Wagner Jan 15 '15 at 22:13
  • @ChrisEelmaa Thanks for the info on passing parameters that helped. I looked into generating the the installer on the fly. If I use the .wixobj file from the build output, I don't need too much. For the moment though, I'm in-memory compiling an exe which wraps the bootstrapper. – Robert Wagner Jan 15 '15 at 22:17
  • @RobertWagner I'm glad you are on your way to a solution. But, a [WiX Bootstrapper](http://wixtoolset.org/documentation/manual/v3/bundle/) is an EXE, not an MSI. – Tom Blodget Jan 15 '15 at 22:37