You may have to clarify which product you're referring to here because 
UPGRADINGPRODUCTCODE is set in the old product if it is being uninstalled 
because of an upgrade. If you're trying to influence the behavior of the old 
product as it uninstalls then it may well be too late. The uninstall sequence 
of that old product is going to run the way it was shipped, and you can't 
influence it by using UPGRADINGPRODUCTCODE in your upgrade. 


Phil Wilson 

-----Original Message-----
From: Carl Tietjen [mailto:ctiet...@novell.com] 
Sent: Tuesday, July 27, 2010 11:49 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Upgrade -- Custom Action running when it shouldn't

Hello,
 
I have 7 custom actions, 5 of which run during Install, and 2 of which run 
during uninstall, none of which should run during an upgrade.  
I am adding the upgrade feature to the product and have run into a problem.  
The 5 that run during install (after InstallFinalize) work fine (i.e. don't 
run) during the upgrade, but the 2 which run during uninstall are also running 
during the upgrade (which I don't want -- I only want them to run during an 
uninstall).
 
For reference, the following is one that works correctly (i.e. the NOT 
OLDERVERSIONBEINGUPGRADED causes this not to run):
 
<Custom Action='SetXCopy' After='InstallFinalize'>(NOT 
OLDERVERSIONBEINGUPGRADED) AND NOT Installed</Custom>
 
I have tried everything I can find on the web, the following tries all fail:
 
1)  <Custom Action='RunRemoveBat' Before='InstallInitialize'>(NOT 
OLDERVERSIONBEINGUPGRADED) AND Installed</Custom>
2)  <Custom Action='RunRemoveBat' Before='InstallInitialize'>(NOT 
UPGRADINGPRODUCTCODE) AND Installed</Custom>
3)  <Custom Action='RunRemoveBat' Before='InstallInitialize'>(NOT 
UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
4)  <Custom Action='RunRemoveBat' Before='InstallInitialize'>(NOT 
UPGRADINGPRODUCTCODE) AND (REMOVE ~="ALL")</Custom>
5)  <Custom Action='RunRemoveBat' Before='InstallInitialize'>REMOVE 
~="ALL"</Custom>
6)  <Custom Action='RunRemoveBat' 
Before='InstallInitialize'>(REMOVE="ALL")</Custom>
 
.....
The following is the pertinent info about the product and install 
 <Product   Id='*' UpgradeCode='6BC1F640-7024-4f18-A53A-BEA60722590B' ....
 
  <Upgrade Id="{6BC1F640-7024-4f18-A53A-BEA60722590B}">
   <UpgradeVersion Property="OLDERVERSIONBEINGUPGRADED"
        Minimum="1.0.0.0" 
        IncludeMinimum="yes"
                    Maximum="!(bind.FileVersion.SecureBridgeEXE)" 
                    IncludeMaximum="no" />
  </Upgrade>
 <InstallExecuteSequence>
...
  <Custom Action='RunRemoveBat' Before='InstallInitialize'>(NOT 
OLDERVERSIONBEINGUPGRADED) AND Installed</Custom>
  <RemoveExistingProducts After="InstallInitialize"/>
  <Custom Action='SetXCopy' After='InstallFinalize'>(NOT 
OLDERVERSIONBEINGUPGRADED) AND NOT Installed</Custom>
 ...
 </InstallExecuteSequence>
_________________
 
The only thing I can think of that could possibly be an issue is that I am not 
incrementing the major or minor version, only the build version (but from what 
I have been able to read, it shouldn't really be an issue).
_________________
 
I am really confused as to why the two custom actions seem to work differently. 
 It would seem to imply that there is some kind of sequence issue (I have tried 
them at InstallFinalize, InstallInitialize and before RemoveFiles with no 
luck).  These actions remove services, so it is important that they be ran only 
during uninstall.
 
Thanks in advance for any help.
 
Carl
 
 
 
 
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


*** Confidentiality Notice: This e-mail, including any associated or attached 
files, is intended solely for the individual or entity to which it is 
addressed. This e-mail is confidential and may well also be legally privileged. 
If you have received it in error, you are on notice of its status. Please 
notify the sender immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any other person. This email comes from a division of the Invensys 
Group, owned by Invensys plc, which is a company registered in England and 
Wales with its registered office at Portland House, Bressenden Place, London, 
SW1E 5BF (Registered number 166023). For a list of European legal entities 
within the Invensys Group, please go to 
http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. 
You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail 
inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be 
subject to the terms of any agreements between Invensys (and/or its 
subsidiaries and affiliates) and the recipient (and/or its subsidiaries and 
affiliates).



------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to