The registry removal is probably occurring in the package being removed. The
upgrading package's properties are not all passed to the packages being
removed.

The package being removed is given a property "UPGRADINGPRODUCTCODE" which
is the product code of the upgrading package. If you add "AND NOT
UPGRADINGPRODUCTCODE" to your "REMOVE"-related condition you should achieve
what you are trying to do (not that it won't help with packages already
released, you will just have to recreate those entries when upgrading
already released packages).

http://msdn.microsoft.com/library/aa372380.aspx

-----Original Message-----
From: Sebastiaan Deckers [mailto:c...@pandion.im] 
Sent: Thursday, February 11, 2010 8:59 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Selectively uninstalling components during major
upgrade

Hi all,

Is there a way to prevent removal of specific components when removal
is part of a major upgrade, as opposed to just an uninstallation?

My app creates certain registry entries at runtime (not the installer
but the actual software). I would like to keep these during an upgrade
while still cleaning them up during installation.

I created a Component with RemoveRegistryKey tags and gave it a
Condition that checks for a variable "AUTOUPDATE" which gets passed
via command line in case of a major upgrade. This doesn't seem to work
as the registry keys are always removed, regardless of the AUTOUPDATE
variable.

Source code:
http://github.com/pandion/pandion/blob/master/Installer/WiX/product.wxs#L259

Any suggestions?

Sebastiaan

----------------------------------------------------------------------------
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to