1
votes

our company is using WiX to create our (currently pretty simple) setup. We have a bootstrapper project which installs the .Net 4.0 Framework and runs our MSI package (WiX setup project). We now want to access the filename of the bootstrapper (Setup.exe) during runtime and save it to a file. Just for background: The filename is not fixed and will be changed by our download server frequently, so we have to access it during runtime.

Unfortunately I didn't find any solution to accomplish this with WiX. Can someone help me? Maybe you have some ideas?

Thanks in advance!

1

1 Answers

0
votes

This is your own bootstrapper, right? If so, the bootstrapper either knows its own name, or can detect it at runtime (::GetModuleFileName()). When the bootstrapper runs the .msi install, have it pass its name as a public property on the command line:

msiexec /i OurPackage.msi IWASBOOTSTRAPPEDBY=bootstrappername.exe

The property IWASBOOTSTRAPPEDBY is then available to the WiX-based .msi package to do with as it pleases.

For that matter, the bootstrapper program itself could write its name to a text file, and not even bother the .msi package with the task.