If you look at the verbose log generated on Reinstall you can see that one of the first actions is RemoveExistingProducts and I assume that this action sets the value of REMOVE to be ALL. You should also look at what happens on a major upgrade as the first step of a major upgrade is uninstallation of the old product. Your current custom action will be executed on a major upgrade and if you don't want to run you have to put a condition for that as well..

DONG LEE wrote:
I wrote a custom action that I call at an uninstall time. Right now, I have
something like...

<CustomAction Id="UninstallAction" BinaryKey="..." DllEntry="..."
Impersonate='no' Execute="deferred" Return="check"/>

<InstallExecuteSequence>
   .
   .
   .
   <Custom Action=UninstallAction Before='RemoveRegistryValues'>
REMOVE~="ALL" and NOT REINSTALL </Custom>
</InstallExecuteSequence>

I am calling the uninstall CA before RemoveRegistryValues because the CA
needs some of the registry values.

I originally had the uninstall CA condition as REMOVE~="ALL" only. But then
this uninstall CA was executed when I
tried to reinstall the msi package. This wasn't what I wanted. I want the
uninstall CA to be run only when user
uninstalls the package. So I put NOT REINSTALL to prevent that.

1) My first question is why was the uninstall CA invoked when I tried to
reinstall? I still can't figure it out till today.
    I've also seen some other people using NOT REINSTALL cond for their
uninstall CA. Why do we need this?
2) What does REMOVE~="ALL" exactly mean? where can I find info on WiX
condition macros like this? I sometimes feel that WiX is way
underdocumented.
    All the blogs that I searched say REMOVE~="ALL" means "During
uninstall." But look what happened when I trusted
    this word by word. I encoutered the problem at 1). I am looking for much
less vague and more accurate answer like
    this means none of the installed components are removed, or something
like that. Is this true? If this is true, then I
    think I might have answered 1) above. Since during reinstall, none of
the components would have been removed.

Thanks!
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to