Thanks that will do it, provided that during the enumeration I can identify the original msi (which is created by our customers, as I'm just shipping a merge module.)
I'd imagined using the handle of the currently-running msi (the newer version that's going to run RemoveExistingProducts) to get the identity of the original msi, but maybe that's not possible? -----Original Message----- From: Karl Denning [mailto:karldenn...@yahoo.co.uk] Sent: Tuesday, April 07, 2009 9:16 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] how to change an installed package? Perhaps this would do the trick 1. Immediate run once CA* sequenced in both the UI and execute sequences before appsearch. (Perhaps condition the execute sequence CA to only run if UILevel < 4) 2. The CA should enumerate every msi in <WINDOWS>\installer. 3. Determine which one is your previous version (msiOpenDatabase + sql query). 4. Change the execute sequence CA condition. 5. Save the MSI. 6. End CA. *The CA does not need to be C++, you could do the above using script and the WindowsInstaller interface. This is not strictly a WiX question, but I'd *really* appreciate any suggestions! I shipped a merge module which customers build into their MSIs. The merge mod installs a device driver. The problem is that I did not properly allow for an upgrade. During an upgrade, the driver must NOT be uninstalled - the custom action that removes the driver should have included NOT UPGRADINGPRODUCTCODE, but I forgot it. The newer version of the merge module will need to edit the installed MSI, and put the condition NOT UPGRADINGPRODUCTCODE on the custom action which installs the driver. How do I do this? A brief outline to get me started will be very helpful and much appreciated. I'm assuming it will need a C++ DLL custom action, but otherwise don't really know much. Unfortunately it isn't possible to produce a separate script (which I know how to do, using SQL to edit tables etc.) -- this has to be done from the merge module, adding the extra complication that it can't hard code the UpgradeCode or ProductCode of the already-installed package. Many thanks! ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- View this message in context: http://n2.nabble.com/how-to-change-an-installed-package--tp2596131p2599847.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users