Have you tried using a custom action, instead of a launch condition to
block install?

e.g.

 <Upgrade Id="$(var.Property_UpgradeCode)">
    <UpgradeVersion OnlyDetect="yes"
                    Minimum="$(var.version)"
                    Property="NEWERVERSIONDETECTED"
                    IncludeMinimum="no" />

    <UpgradeVersion OnlyDetect="yes"
                    Maximum="$(var.version)"
                    Property="OLDERVERSIONDETECTED"
                    IncludeMaximum="no" />
</Upgrade>

<CustomAction Id="CA_BlockInstall" Error="!(loc.MyError)" />

 <InstallExecuteSequence>
    <Custom Action="CA_BlockInstall" After="FindRelatedProducts">
      <![CDATA[NEWERVERSIONDETECTED Or OLDERVERSIONDETECTED]]>
    </Custom>
    <LaunchConditions After="AppSearch" />
  </InstallExecuteSequence>

 <InstallUISequence>
    <Custom Action="CA_BlockInstall" After="FindRelatedProducts">
      <![CDATA[NEWERVERSIONDETECTED Or OLDERVERSIONDETECTED]]>
    </Custom>
    <LaunchConditions After="AppSearch" />
  </InstallUISequence>



On Fri, Dec 18, 2009 at 9:44 AM, Jason T. <jt2...@gmail.com> wrote:
> Hello,
>
> I'm trying to detect when a different version of my package has
> already been installed so that I can abort the installation.  I'm not
> looking to do the "major upgrade", I just want to abort if either an
> older or a newer version is found (if the version is the same the
> repair/remove logic already functions correctly).  I have added this:
>
>  <Upgrade Id='$(var.UpgradeCode)'>
>    <UpgradeVersion OnlyDetect='yes' Minimum='$(var.ProductVersion)'
> Property='NEWERVERSIONDETECTED' IncludeMinimum='no' />
>   <UpgradeVersion OnlyDetect='yes' Maximum='$(var.ProductVersion)'
> Property='OLDERVERSIONDETECTED' IncludeMaximum='no' />
> </Upgrade>
>
> <Condition Message="Another version of this package is already
> installed, you must uninstall that first.">(NOT NEWERVERSIONDETECTED)
> AND (NOT OLDERVERSIONDETECTED)</Condition>
>
> This seems to have no effect however, both older and newer versions of
> the package (as defined by var.ProductVersion) are allowed to install
> on top of the existing version (multiple entries then appear in
> Add/Remove Programs).  I also played around with different things in
> the InstallExecuteSequence and InstallUISequence sections, for example
>
> <FindRelatedProducts Before='LaunchConditions' />
>
> But this doesn't seem to do anything either.  When I log the installs
> I don't see NEWERVERSIONDETECTED or OLDERVERSIONDETECTED being set to
> anything.
>
> What am I missing?  Or, conversely, is there a simpler way to do what
> I am trying to do?
>
> Thanks!
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to