View Full Version : Adding rows to installation database tables during install

10-17-2011, 03:18 AM
The help for the Registry table quotes
"A custom action can be used to add rows to the Registry table during an installation, uninstallation, or repair transaction. These rows do not persist in the Registry table and the information is only available during the current transaction. The custom action must therefore be run in every installation, uninstallation, or repair transaction that requires the information in these additional rows. The custom action must come before the RemoveRegistryValues and WriteRegistryValues actions in the action sequence."

My question is how ?

I have checked through the help for just about all obvious leads but still cannot find how to do this ( N.B. The recomended way ).

10-17-2011, 09:05 AM
Depending on what you're trying to do, there's often a more straightforward way than modifying the in-memory MSI database, but for the general idea see (for example) this ancient newsletter tip (PDF): http://www.flexerasoftware.com/webdocuments/PDF/msiaccess.pdf.

10-18-2011, 06:31 AM

I did manage to find an example of the MsiCreateRecord method and associated calls for opening the running database from the forum but the user manuals are rather slim on these kinds of detail.