You have two launch conditions: your downgrade attempt (seems correctly
written) and your upgrade detection/requirement (which is written using
weird logic that seems to be the root of your frustration).

Change your second condition to look like this:

                <Condition Message="A previous version of [ProductName]
was not found. Setup will now exit.">OLDERVERSIONBEINGUPGRADED OR
Installed</Condition>

The condition, when true, allows the installation. The message is shown (and
the transaction is blocked) when the condition is FALSE.

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com] 
Sent: Monday, November 16, 2009 1:52 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Require version for upgrade

I don't think this is correct, as of WiX version 3.0.5027.0 the default
is for FindRelatedProducts to run before LaunchConditions.

Neil

-----Original Message-----
From: Alexander Shevchuk (Volt) [mailto:a-ale...@microsoft.com] 
Sent: 16 November 2009 21:25
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Require version for upgrade

<Condition> element under <Product> is a LaunchConditions action and
usually LaunchConditions action is scheduled way before
FindRelatedProducts action.  What you need is appropriately conditioned
Custom Action Type 19 scheduled right after FindRelatedProducts in both
InstallUISequence and InstallExecuteSequence.



-----Original Message-----
From: Scharp, Craig [mailto:craig.sch...@fuelquest.com] 
Sent: Monday, November 16, 2009 12:36 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Require version for upgrade

Hi wix users,

 

Does anyone know how to stop an installation if a previous version does
not exist?  I have followed the following links, but just can't seem to
get this to work properly.  I would like the install to stop if a
specified version does not exist, forcing the user to be a the correct
version before upgrading.

 

http://wix.sourceforge.net/manual-wix3/major_upgrade.htm

http://www.tramontana.co.hu/wix/lesson4.php#4.1

http://blogs.technet.com/alexshev/archive/2008/02/15/from-msi-to-wix-par
t-8-major-upgrade.aspx

 

Here's a sample of some code:

 

  <?define ProductId="{MYProductGUID}" ?>

  <?define RTMProductVersion="2.0.031" ?>

  <?define ProductVersion="2.0.032" ?>

  <?define UpgradeCode="{MYUpgradeGUID}"?>

  <Product Id="$(var.ProductId)" Name="My Product 2.0.032"
Manufacturer="abc, Inc." Version="$(var.ProductVersion)" Language="1033"
UpgradeCode="$(var.UpgradeCode)">

    <Package Id="$(var.PackageCode)" Keywords="Web Application, ASP.NET"
Description="abc product  ($(var.ProductVersion) upgrade)"
Manufacturer="abc, Inc." InstallerVersion="300" Languages="1033"
Compressed="yes" SummaryCodepage="1252" InstallPrivileges="elevated" />

    <Upgrade Id="$(var.UpgradeCode)">

                  <UpgradeVersion Minimum="$(var.RTMProductVersion)"
IncludeMinimum="yes" Maximum="$(var.ProductVersion)"
Property="OLDERVERSIONBEINGUPGRADED" />

                  <UpgradeVersion Minimum="$(var.ProductVersion)"
OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />

    </Upgrade>

                <Condition Message="A later version of [ProductName] is
already installed. Setup will now exit.">NOT NEWERVERSIONDETECTED OR
Installed</Condition>

                <Condition Message="A previous version of [ProductName]
was not found. Setup will now exit.">NOT OLDERVERSIONBEINGUPGRADED OR
NOT Installed</Condition>

 

 

Thanks in advance for any suggestions.

 

Thx, Craig

 

------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day 
trial. Simplify your report design, integration and deployment - and
focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day 
trial. Simplify your report design, integration and deployment - and
focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to