>From memory so this may not be 100% - Windows Installer evaluates
properties as true if they are set, and false if they are not. i.e.
setting MYFLAG=true on the command line will result in boolean condition
tests on MYFLAG returning true, but so will setting MYFLAG=false, as the
MYFLAG property will be set to the string false.

So you'll need to use string comparison tests, and you'll probably want
to use MYFLAG~="true" which will perform a case-insensitive string
comparison, i.e. true for MYFLAG=True or MYFLAG=true, but not for
MYFLAG=false.

Cheers,
James

-----Original Message-----
From: Christopher Karper [mailto:christopher.kar...@gmail.com] 
Sent: 01 July 2009 12:25
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Boolean paramaters

You have a boolean operator right in that very example...   I'm just
winging
this, but try:
<Condition Message="Required prerequisite (PowerShell 1.0) is not
found.">

<![CDATA[Installed OR ((POWERSHELL >= "1.0") And (MYFLAG))]]>

</Condition>

On Wed, Jul 1, 2009 at 12:21 AM, sandun css <sandun...@gmail.com> wrote:

> Hi,
>
> I have some conditions in my msi, like the following,
>
>
> <Condition Message="Required prerequisite (PowerShell 1.0) is not
found.">
>
> <![CDATA[Installed OR (POWERSHELL >= "1.0")]]>
>
> </Condition>
>
> But I need to run these conditions only if a certain parameter is set
to
> 'true'. (i.e. msiexec /i installer.msi MYFLAG=true)
>
> Are there boolean parameters, or do I need to treat 'true' and 'false'
> valuse as strings?
>
> Thanks,
>
> Sandun
>
>
------------------------------------------------------------------------
------
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
This e-mail is confidential and the information contained in it may be
privileged. It should not be read, copied or used by anyone other than the
intended recipient.  If you have received it in error, please contact the sender
immediately by telephoning (+44 (0)20 7623 8000) or by return email, and delete 
the e-mail and do not disclose its contents to any person.  We believe, but do
not warrant, that this e-mail and any attachments are virus free, but you must
take full responsibility for virus checking. Please refer to 
http://www.dresdnerkleinwort.com/disc/email/ and read our e-mail disclaimer 
statement and monitoring policy.

Dresdner Kleinwort is a brand and trading name of the Commerzbank group and 
operates through Commerzbank AG, Dresdner Kleinwort Limited and their affiliated
or associated companies.  Commerzbank AG is a company incorporated in Germany
with limited liability and registered in England (registered no. FC008139, place
of business 60 Gracechurch Street, London EC3V 0HR) and is authorised by 
Bundesanstalt fuer Finanzdienstleistungsaufsicht (BaFin) and authorised and 
subject to limited regulation by the Financial Services Authority (FSA).
Dresdner Kleinwort Limited is a company incorporated in England with limited 
liability (registered no. 551334, registered office 30 Gresham Street, London 
EC2V 7PG) and is authorised and regulated by the FSA.  Details about the extent
of our authorisations and regulation are available on request. 


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to