Robert Wagner
Robert Wagner

Reputation: 17793

Changing a property inside a WIX Bundle

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

Upvotes: 3

Views: 4316

Answers (1)

Erti-Chris Eelmaa
Erti-Chris Eelmaa

Reputation: 26268

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.

Upvotes: 3

Related Questions