Home | What's New | Properties | Command Line | Managing Properties | MSI Integration | Samples | Roadmap |
XmlPreprocess can be invoked as a custom action by an MSI to merge environment settings into your configuration files at deployment time.
Add a custom page with two text boxes to the installer's UI to collect the settings file name into a property named SETTINGSFILE, and optionally additional custom properties into a property named CUSTOMSETTINGS
Add the XmlPreprocess.exe file to the installer
Add a custom action that invokes XmlPreprocess.exe with the appropriate command line parameters, for example:
/s "[SETTINGSFILE]" /i "[TARGETDIR]web.config" [CUSTOMSETTINGS]
See the WiXSetup sample for the WiX script necessary to integrate with WiX 3.*
XmlPreprocess.exe can also be invoked by InstallUtil.exe with the same basic command line syntax
Note: The InstallUtil interface is deprecated, and is not in sync with the command line.
InstallUtil.exe /i=web.config /s=dt_settings.xml /d:installer /d:debug /d:trace=4 XmlPreprocess.exe
This will perform exactly the same deployment as the first
Command Line example.