Bryan has it right. In the older install that is being uninstalled,
REMOVE="ALL" means it's being uninstalled, and UPGRADINGPRODUCTCODE is
also set if it's being uninstalled by an upgrade.

If you are in the new product being installed and you used the
majorupgrade element, the WIX_UPGRADE_DETECTED property is set as the
documentation says.

Forget sequence numbers - they irrelevant. What matters is where
actions are sequenced relative to other actions, not what the number
is. Also, don't make the mistake of assuming that properties like
UPGRADINGPRODUCTCODE are set to "true" or "false", or 0 or 1. They are
not, so don't use them like that in any conditions.
---------------
Phil Wilson


On Fri, Apr 25, 2014 at 7:08 AM, Bryan Wolf <brw...@jackhenry.com> wrote:
> Try the UPGRADINGPRODUCTCODE property[1] as well as the property associated 
> with your Major Upgrade[2]. There's no need for all the custom actions. The 
> Major Upgrade property is set for the version to be installed and the 
> UPGRADINGPRODUCTCODE property is set for the version that is being 
> upgraded/removed. So, in other words, if your sequence is being run with 
> UPGRADINGPRODUCTCODE set then you are in a major upgrade removal. If the 
> Major Upgrade property is set then you're performing a major upgrade of 
> another version.
>
> [1] http://msdn.microsoft.com/en-us/library/aa372380(v=vs.85).aspx
> [2] http://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html
>
> -----Original Message-----
> From: Karkare,Aparna [mailto:akark...@travelers.com]
> Sent: Friday, April 25, 2014 6:25 AM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Setting property at a sequence
>
> Hi,
>
> I have a custom action which is sequenced to run at number 1554. When an 
> Upgrade is happening, this custom action runs twice; 1st for Uninstall and 
> then for Install. I want that this custom action should run only for 
> Uninstall iteration and should skip at Install iteration internally when an 
> Upgrade is happening (i.e. when Uninstall and Install both cycles run one 
> after other).
>
> I couldn't find any condition which will separate these two scenarios 
> (Uninstall and Install phase of an upgrade). There is no property which 
> changes after the Uninstall cycle is over.
> REMOVE="ALL" is true from the beginning till end of whole upgrade cycle.
>
> Hence I wrote another custom action which will set value of a property 
> (UNINSTALLMARKED) at sequence number around 1555 so that when Install starts 
> after Uninstall, I can use this property to differentiate between two 
> scenarios. So My condition looks like below:
>
> <Custom Action="QtExecHKCRHTTPImportProperty_Cmd" 
> Sequence="1554">(REMOVE="ALL") AND (EXISTINGVERSION) AND (NOT 
> UNINSTALLMARKED)</Custom>
>
> EXISTINGVERSION property also is always set right from the beginning as it 
> detects an Upgrade.
>
> I assumed when Uninstall cycle starts above condition will be true as 
> 'UNINSTALLMARKED' will not be set at sequence number 1554. But it will be set 
> at 1555. Hence this custom action will get executed for the Uninstall cycle 
> and will be skipped for Install cycle as by then the 'UNINSTALLMARKED'' 
> property will be set.
>
> However when I ran an Upgrade (run msi), below are the logs:
>
> MSI (s) (14:F4) [06:22:19:824]: Skipping action: 
> QtExecHKCRHTTPImportProperty_Cmd (condition is false) MSI (s) (14:F4) 
> [06:22:19:864]: PROPERTY CHANGE: Adding UNINSTALLMARKED property. Its value 
> is 'UNINSTALLED'.
>
> I don't understand if the property is getting set after the custom action 
> then why the condition is false? I believe out of three properties in the 
> condition the culprit is 'UNINSTALLMARKED' as according to logs both other 
> properties are getting set very early in the logs.
>
> Is it like even if I see property getting set later in the logs, it actually 
> is set before itself? Below is how I am setting property.
>
> <CustomAction Id="CA_MarkUninstall" Property="UNINSTALLMARKED" 
> Value="UNINSTALLED" Execute="immediate" /> <Custom Action="CA_MarkUninstall" 
> Sequence="1555"></Custom>
>
> I basically need a condition which will differentiate between UNINSTALL and 
> INSTALL phase of an Upgrade.
>
>
> Aparna Karkare
> L&T Infotech
> OAI-sys<http://inside.here.travp.net/OperationsSystems/iwcm/IT/Portfolios/Architecture/Components/index.aspx>,
>  Enterprise Components and Frameworks
> Office: 020-6641-6142
> Email: akark...@travelers.com
>
> ________________________________
> This communication, including attachments, is confidential, may be subject to 
> legal privileges, and is intended for the sole use of the addressee. Any use, 
> duplication, disclosure or dissemination of this communication, other than by 
> the addressee, is prohibited. If you have received this communication in 
> error, please notify the sender immediately and delete or destroy this 
> communication and all copies.
>
> TRVDiscDefault::1201
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform Build your Enterprise 
> Intranet with eXo Platform Software Java Based Open Source Intranet - Social, 
> Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A 
> Collaboration Platform http://p.sf.net/sfu/ExoPlatform 
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> NOTICE: This electronic mail message and any files transmitted with it are 
> intended
> exclusively for the individual or entity to which it is addressed. The 
> message,
> together with any attachment, may contain confidential and/or privileged 
> information.
> Any unauthorized review, use, printing, saving, copying, disclosure or 
> distribution
> is strictly prohibited. If you have received this message in error, please
> immediately advise the sender by reply email and delete all copies.
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to