The problem is the sequencing. By the time InstallFinalize has happened,
the install is already committed, so you can't roll back the install of
version 2, at least if I'm understanding it correctly. You probably want
your RemoveExistingProducts to be somewhere earlier in the sequence, so
that it can cause a rollback of version 2's install if version 1's
uninstall fails.
There are problems with all placements of this action, however, so you
should decide what is the worst of your evils. If you have Phil Wilson's
book, it describes the pros and cons of the different placements of
RemoveExistingProducts. I don't have it here at work with me - it's
sitting on my desk at home - otherwise I'd look it up and recommend
alternatives for you.
Kelly
Ted Berg <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
10/30/2007 11:50 AM
To
wix-users@lists.sourceforge.net
cc
Subject
[WiX-users] Help with Major Upgrade
I am packaging an MSI that I would like to have perform a Major Upgrade
when deployed on a machine with an older version of said package already
installed.
My setup:
* Product Id is set to "????????-????-????-????-????????????"
* Upgrade Code is set to <some GUID> which does not change
* The Upgrade clause is set to
<Upgrade Id="<some GUID>">
<UpgradeVersion
Minimum="$(var.VERSION)"
OnlyDetect="yes"
Property="NEWERVERSIONDETECTED" />
<UpgradeVersion
Minimum="1.0.0.0"
IncludeMinimum="yes"
Maximum="$(var.VERSION)"
IncludeMaximum="no"
Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>
Where var.VERSION is our major.minor.micro.build version number.
* InstallExecuteSequence contains the following entries:
<RemoveExistingProducts After="InstallFinalize"/>
* The package launches an application upon installation.
Scenarios:
* Install version 1 of package, Install version 2 of package. Version 2
install notices that version 1 is running and asks for it to be shut
down. User complies and the install completes normally. Version 2 is
the only package that appears in Add/Remove Programs.
* Install version 1 of package, Install version 2 of package. When
asked to shut down running copy of version 1, User hits the Exit button.
Install informs user that their system was not modified and exits.
Both versions now appear in Add/Remove Programs. When the application
is next launched it is version 2.
In the second scenario the install of Version 2 should roll back and
exit as the UI implies. What do I need to do for this to happen?
Failing that how can I prevent scenario 2?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
**************************************************************************************
This communication is intended solely for the addressee and is
confidential. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. Unless indicated
to the contrary: it does not constitute professional advice or
opinions upon which reliance may be made by the addressee or any
other party, and it should be considered to be a work in progress.
Unless stated otherwise, this communication does not form a prescribed
statement of actuarial opinion under American Academy of Actuaries
guidelines.
**************************************************************************************
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users