Hi Blair,

Thanks again for your advice. Sadly the late scheduling causes too
many other problems like updated files being removed. So I'll just
give up on the idea of cleaning up the registry. Not too important.

I really wish Windows Installer provided some kind of procedural
mechanism. I can appreciate the core concept of declarative
installation. But there are so many edge cases which could easily be
handled by small scripted sequences. The declarative syntax is
incredibly frustrating and unintuitive to handle the long tail of
installation quirks. Even NSIS's assembler madness makes it possible
to handle just about any edge case. Just my 0.02.

Sebastiaan


On Sat, Feb 13, 2010 at 2:11 AM, Blair <os...@live.com> wrote:
> I looked it up really fast: RemoveRegistryKey/removeOnUninstall creates an
> entry in the Registry table with the Name column being set to "-", which
> causes the key to be removed when the component is removed without creating
> the key when the component is installed.
>
> The condition isn't part of the Registry table, it is a part of the
> Component table, and component conditions are not used when the feature
> containing the component is removed.
>
> Uninstallation of a component during upgrade is controlled the combination
> of two factors: the presence of the same Component-GUID in the upgrading
> package, and the sequence of the RemoveExistingProducts. If
> RemoveExistingProducts is sequenced early, the component will be removed
> every upgrade. If the same GUID isn't in the new package, the component will
> be removed every upgrade. You have to place RemoveExistingProducts "late"
> (either right before or after InstallFinalize).
>
> Note that using the "late" placement of RemoveExistingProducts requires a
> more strict observance of the component rules.
>
> -----Original Message-----
> From: Sebastiaan Deckers [mailto:c...@pandion.im]
> Sent: Friday, February 12, 2010 2:11 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Selectively uninstalling components during major
> upgrade
>
> Thanks for the tip. Unfortunately the registry keys still seem to get
> deleted during the upgrade. I'm using a
> RemoveRegistryKey/removeOnUninstall with the "NOT
> UPGRADINGPRODUCTCODE" Condition. My guess is that the Condition gets
> evaluated at installation time instead of during the upgrade. Is that
> how it works? Then how can I delete these registry keys only during a
> manual uninstall, while leaving them intact during an upgrade?
>
> Thanks again,
>
> Sebastiaan
>
>
> On Fri, Feb 12, 2010 at 3:55 AM, Blair <os...@live.com> wrote:
>> 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
>>
>
> ----------------------------------------------------------------------------
> --
> 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
>

------------------------------------------------------------------------------
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