Here's my situation. I have a WiX bundle package with a custom installer UI. It has one MSI packaged into it (that has no UI). You can download that bundle from my server. I want to modify that bundle just before it's downloaded to pass the current address of the server into the MSI. (The MSI is setup to take the server address as a parameter and write that to the app.config.)
I'm aware that this can be done directly on the MSI using the Microsoft.Deployment.WindowsInstaller library (although I'm not sure that I could even do that on a signed MSI and bundle).
Which one of these options is the best way to accomplish this?
Do a binary replace in the bundle. (I tried to find the server parameter in the bundle binary. I can't see anything of the kind.)
Repackage the bundle EXE into a new .NET EXE using CodeDom. The new EXE contains the original bundle as an embedded resource, extracts to a temp file, runs it. This is my current approach, but it's painful to get all the attributes right and get the resource in and out in one piece. I haven't yet succeeded.
Use WiX to extract the bundle, modify the source, and then rebuild it. I'm not sure how this plays with a signed bundle. It would also require me to install WiX along side my server. Is there some PackageRef I can use in a bundle to install WiX itself?
Find the CAB file header. Extract it. Modify the MSI. Repalce the CAB bytes in the bundle. I tried this approach. It gives me this error: Failed to verify hash of payload. I can't see where the hash is encoded in the bundle.
Use some other binary manipulation or API of which I'm not aware? I can use any version of WiX.