[wix-users] Applying a condition in Component

Fyodor Koryazhkin fyodorkor at gmail.com
Fri Jan 20 07:50:18 PST 2017


HI,
If you mark component as Transitive then on re-installation it will be
uninstalled if a condition evaluates to false and reinstalled if the
condition evaluates to true.
Instead use the component attribute msidbComponentAttributesNeverOverwrite
(128).
Read
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368007(v=vs.85).aspx
for further information

On Fri, Jan 20, 2017 at 4:10 PM, John Cooper <JoCooper at jackhenry.com> wrote:

> 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.
>
> Hi,
>
>
>
> 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'>
>
>            <Condition>
>
>              <![CDATA[REINSTALLMODE<>"ecmus"]]>
>
>            </Condition>
>
> <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.
>
>
>
> Thanks
>
>
>
> Regards,
>
> Mufaddal
>
>
> ____________________________________________________________________
> 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.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/




-- 
Regards,
Fyodor Koryazhkin..


More information about the wix-users mailing list