Thanks use two, great help. I know the default so I was able to just use one
set property. Thanks


-----Original Message-----
From: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com] 
Sent: 19 September 2012 15:32
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] set a property using If statements

Sorry, I'd forgotten about that. Thanks Nelya. You'd end up with 2 custom
actions with the same Id. You need to write out one or both of the set
property custom actions in long form as shown in the previous post
(SetProperty is just a shorthand).

-----Original Message-----
From: Nelya Iva [mailto:nelya....@gmail.com]
Sent: 19 September 2012 15:01
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] set a property using If statements

A small addition to Peter's answer. I think that you'll get a warning like:
'duplicate of id SetNumloggers'. So better use CustomAction element with two
different 'ID'.

<CustomAction Id='First' Property='NUMLOGGERS' Value='2'></CustomAction>
<InstallExecuteSequence>

<Custom Action=' First ' Sequence='71'> ProductName = "somevalue" </Custom>

2012/9/19 Peter Shirtcliffe <pshirtcli...@sdl.com>

> Yes. Youd use a pair of SetProperty elements (or a default property 
> setting and an override):
> e.g.
>
>
> <SetProperty Id="NUMLOGGERS" Value="2">ProductName = 
> "somevalue"</SetProperty> <SetProperty Id=" NUMLOGGERS"
> Value="16"><![CDATA [  ProductName <> "somevalue" ]]></SetProperty>
>
> You would need to set the Before or After attributes if you wanted the 
> assignment to take place earlier than the default.
> This only makes sense if your condition can only be evaluated at run time.
> If
> you knew the value at compile time then the preprocessor approach 
> would be better.
>
> BTW changing Secure won't have had the effect you observed - it will 
> have been some other change you made. Secure=yes just enables the 
> property value to propagate from the commandline & UI sequence to the
Execute sequence.
>
> -----Original Message-----
> From: Natalie Carr [mailto:natalie.c...@measuresoft.com]
> Sent: 19 September 2012 14:33
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: Re: [WiX-users] set a property using If statements
>
>
> Peter is it possible for this to be done at run time?
>
> -----Original Message-----
> From: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com]
> Sent: 19 September 2012 13:05
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] set a property using If statements
>
> The code you give seems fine. Did you want to do it at run-time 
> instead of at compile time ?
>
> -----Original Message-----
> From: Natalie Carr [mailto:natalie.c...@measuresoft.com]
> Sent: 19 September 2012 12:37
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] set a property using If statements
>
> Is it possible to set a property using If statements, I would like 
> something like this to work but it doesn't and I am not sure if it can 
> even be done:
>
>
>
>     <?if $(var.ProductName) = "SomeName ?>
>
>     <Property Id="NUMLOGGERS" Secure="yes" Value="2"/>
>
>     <?else?>
>
>     <Property Id="NUMLOGGERS" Secure="yes" Value="16"/>
>
>     <?endif?>
>
>
>
> Kind Regards,
>
>
>
> Natalie Carr
>
>
>
>
> ----------------------------------------------------------------------
> ------
> -
> -
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond.
> Discussions will include endpoint security, mobile security and the 
> latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> SDL PLC confidential, all rights reserved.
> If you are not the intended recipient of this mail SDL requests and 
> requires that you delete it without acting upon or copying any of its 
> contents, and we further request that you advise us.
> SDL PLC is a public limited company registered in England and Wales.
> Registered number: 02675207.
> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire
> SL6 7DY, UK.
>
>
>
> ----------------------------------------------------------------------
> ------
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. 
> Discussions will include endpoint security, mobile security and the 
> latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ----------------------------------------------------------------------
> -------
> -
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. 
> Discussions will include endpoint security, mobile security and the 
> latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ----------------------------------------------------------------------
> --------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. 
> Discussions will include endpoint security, mobile security and the 
> latest in malware threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
----------------------------------------------------------------------------
-
-
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to