[wix-users] Applying a condition in Component

John Cooper JoCooper at jackhenry.com
Fri Jan 20 06:10:47 PST 2017

1) REINSTALLMODE is a very poor choice for determining if you are in a repair.  See REINSTALL.
2) Your component Condition authoring will only be evaluated once.  If you want the Condition to always be evaluated, you'll need to mark the Component as Transitive.
3) If you use XmlConfig, you may be able to avoid a conditional component in this scenario.
4) Don't double post to Dev.  It will feed the lions.
John Merryweather Cooper
Senior Software Engineer -- Integration Development Group -- Enterprise Notification Service
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Office:  913-341-3434x431050
JoCooper at jackhenry.com

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Laique Abbas
Sent: Friday, January 20, 2017 7:11 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Applying a condition in Component

The e-mail below is from an external source.  Please do not open attachments or click links from an unknown or suspicious origin.


I need to skip a component when the setup is executed in"Repair Mode". I am using "REINSTALLMODE" Property toidentify if the setup is executing in Repair Mode. Below is the code snippetfor the Component.

<Component Id='UpdateConfig' Guid='EDA4F128-BCC1-4C0A-B8AC-588FCF3B64EB' KeyPath='yes'>




<util:XmlFile Id='IP' Action="setValue" ElementPath="//configuration/appSettings/add[\[]@key='IP'[\]]/@value" File="[INSTALLLOCATION]Service.exe.config" Value="[SERVERIP]" /></Component>

I can get the property value REINSTALLMODE="ecmus"from the log file but the condition in component is not working. I have triedNOT operator as well but it is not working.

Can you please help me identify the issue here.




WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.

More information about the wix-users mailing list