My installer was simple so far, with only files to install. It has come the time where I may need to introduce custom actions, to generate a plugin cache/index at install time. I'm switching between WiX documentation and MSDN and blog posts and feeling a bit lost about CAs.
Background: The index updater recursively looks for plugins in multiple directories, and writes their metadata in a binary file next to the DLLs. I have multiple applications that will use this. The common libraries (including the plugin loader and index updater tool) are in a separate .msi package. There is a Burn bundle (for each application) that chains the common-libraries package and the application package. What I need is to have every package run the index updater after installing its own files. On uninstallation of an application package, the index has to be updated again rather than being deleted, ie. the same CA would run. This is because there may be multiple packages installing plugins to the same directory. If I have A.msi and B.msi installed, uninstalling B.msi has to remove pluginB.dll and rerun the updater so that the plugin index only contains pluginA.dll. Uninstallation of the common-libraries package indicates the last application is being uninstalled, so in this case the index files would be deleted. I'm not sure how to handle rollback. Suppose A.msi is already installed, I install B.msi, the update-index CA runs, and for some reason installation fails and rolls back. The correct result is to have the index with only pluginA.dll in it, as it was before the installation started. Should the index updater store a backup that I can restore in rollback? If so, when would that backup be deleted? Or is it possible in a rollback to rerun the updater *after* pluginB.dll has been deleted? Except for the rollback issue, it looks like the easiest way is to use a type 18 deferred CA that runs plugin-update-index.exe from my app's installation directory after the files are installed. Is this the best way? -- Nicolás ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users