You will want to test this, but:

    <!-- Verify not an Unknown OS -->
    <Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      <![CDATA[VersionNT=501 OR VersionNT=502 OR VersionNT=600 OR
VersionNT=601]]>
    </Condition>
    <!-- Verify Vista SP2 or above -->
    <Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      <![CDATA[NOT VersionNT=600 OR (WindowsBuild=6002 AND ServicePackLevel
>=2)]]>
    </Condition>
    <!-- Verify XP SP3 or above -->
    <Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      <![CDATA[NOT VersionNT=501 OR (WindowsBuild=2600 AND ServicePackLevel
>=3)]]>
    </Condition>
    <!-- Verify Windows Server 2003 SP2 or above -->
    <Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      <![CDATA[NOT VersionNT=502 OR (WindowsBuild=3790 AND ServicePackLevel
>=2)]]>
    </Condition>
    <!-- Verify Windows Server 2008 -->
    <Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      <![CDATA[NOT VersionNT=600 OR WindowsBuild=6001]]>
    </Condition>
    <!-- Verify Windows Server 2008 R2 -->
    <Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      <![CDATA[NOT VersionNT=601 OR WindowsBuild > 7100]]>
    </Condition>

The schema for the LaunchCondition table includes that the condition is a
255 character string. You can have multiple entries in that table, all
conditions must pass for the package to run. There is not restriction on the
message having to be unique, however, so the above code should work.

-----Original Message-----
From: Ali Khan [mailto:alikhan...@hotmail.com] 
Sent: Wednesday, October 07, 2009 5:05 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Condition-element


Hi -
 
In order to add Conditions to allow installing my application only on
certain Operating Systems I am using WiX's Condition-Element. When I add the
first four conditions, the installer builds successfully:
 
<!-- Vista SP2 or above -->
<!-- XP SP3 or above -->
<!-- Windows Server 2003 SP2 or above -->
<!-- Windows Server 2008 -->
 
<Condition Message="$(var.ProdName) is not supported on this version of
Operating System.">
      (VersionNT=600 AND WindowsBuild=6002 AND ServicePackLevel >=2) OR 
      (VersionNT=501 AND WindowsBuild=2600 AND ServicePackLevel >=3) OR 
      (VersionNT=502 AND WindowsBuild=3790 AND ServicePackLevel >=2) OR 
      (VersionNT=600 AND WindowsBuild=6001)
</Condition>
 
 However as soon as I add the fifth condition, inside the Condition-Element
above:
 
   <!-- Windows Server 2008 R2 -->
   (VersionNT=601 AND WindowsBuild > 7100)
 
 
Light.exe gives me error: String overflow.
 
Any solution?
 
 
Thanks,
Ali                                       
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to