dspiegs
dspiegs

Reputation: 568

Finding location of MSI components after installation

Currently I have a set of MSIs built using WiX. During installation they take user input and make some changes to some app.config XML files.

I also have a WiX Burn managed bootstrapper application with the same fields that passes the user input down to the MSIs.

What I want to do now is load the existing config file during upgrades and pre-populate the fields in the BA for better UX.

If I know the GUID, the Component ID and the File ID of the config file is there a way I can find its location to to load at runtime?

Upvotes: 0

Views: 457

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55581

Is your bootstrapper application native or managed? MSI exposes some API's and WiX DTF encapsulates them. See functions such as:

MsiGetComponentPath function

You could also choose to have the installer write something like HKEY_LOCAL_MACHINE\SOFTWARE\COMPANY\PRODUCT\INSTALLDIR if you want to keep it simpler.

Upvotes: 2

Related Questions