conditional component installation

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

conditional component installation

Baker, Steve

Hi all,

 

I have a web.config for production and for staging. I only want one of them installed.

 

Do I have to create features like the tutorial says or can I just use a condition in each component like this:

 

<Directory Id="TARGETDIR" Name="SourceDir" >

     

      <Component Id="ProductionConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webprod.config" LongName="web.config" Name="WEB.CON" src="UI\webprod.config" />   

            <Condition>NOT STAGING</Condition>

      </Component>

     

<Component Id="StagingConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webqa.config" LongName="web.config" Name="WEB.CON" src="UI\webqa.config" />     

            <Condition>STAGING</Condition>

      </Component>

 

</Directory>

 

Then set the STAGING property when I run the msi?

 

TIA,

 

steve

Reply | Threaded
Open this post in threaded view
|

RE: conditional component installation

Rob Mensching

You can do either.  Whatever works best for you.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Baker, Steve
Sent: Friday, September 16, 2005 9:39 AM
To: [hidden email]
Subject: [WiX-users] conditional component installation

 

Hi all,

 

I have a web.config for production and for staging. I only want one of them installed.

 

Do I have to create features like the tutorial says or can I just use a condition in each component like this:

 

<Directory Id="TARGETDIR" Name="SourceDir" >

     

      <Component Id="ProductionConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webprod.config" LongName="web.config" Name="WEB.CON" src="UI\webprod.config" />   

            <Condition>NOT STAGING</Condition>

      </Component>

     

<Component Id="StagingConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webqa.config" LongName="web.config" Name="WEB.CON" src="UI\webqa.config" />     

            <Condition>STAGING</Condition>

      </Component>

 

</Directory>

 

Then set the STAGING property when I run the msi?

 

TIA,

 

steve

Reply | Threaded
Open this post in threaded view
|

RE: conditional component installation

Erv Walter
In reply to this post by Baker, Steve
Can you really have two components with the same GUID (as below) but with Conditions to ensure that only one is installed?  I would think WiX or MSI would complain about the GUID reuse.


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Mensching
Sent: Friday, September 16, 2005 12:35 PM
To: 'Baker, Steve'; [hidden email]
Subject: RE: [WiX-users] conditional component installation

You can do either.  Whatever works best for you.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Baker, Steve
Sent: Friday, September 16, 2005 9:39 AM
To: [hidden email]
Subject: [WiX-users] conditional component installation

 

Hi all,

 

I have a web.config for production and for staging. I only want one of them installed.

 

Do I have to create features like the tutorial says or can I just use a condition in each component like this:

 

<Directory Id="TARGETDIR" Name="SourceDir" >

     

      <Component Id="ProductionConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webprod.config" LongName="web.config" Name="WEB.CON" src="UI\webprod.config" />   

            <Condition>NOT STAGING</Condition>

      </Component>

     

<Component Id="StagingConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webqa.config" LongName="web.config" Name="WEB.CON" src="UI\webqa.config" />     

            <Condition>STAGING</Condition>

      </Component>

 

</Directory>

 

Then set the STAGING property when I run the msi?

 

TIA,

 

steve

Reply | Threaded
Open this post in threaded view
|

RE: conditional component installation

Baker, Steve
In reply to this post by Baker, Steve

Yeah, sorry, I changed one of them after emailing ;)

 


From: Erv Walter [mailto:[hidden email]]
Sent: Friday, September 16, 2005 12:41 PM
To: [hidden email]; Baker, Steve; [hidden email]
Subject: RE: [WiX-users] conditional component installation

 

Can you really have two components with the same GUID (as below) but with Conditions to ensure that only one is installed?  I would think WiX or MSI would complain about the GUID reuse.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Mensching
Sent: Friday, September 16, 2005 12:35 PM
To: 'Baker, Steve'; [hidden email]
Subject: RE: [WiX-users] conditional component installation

You can do either.  Whatever works best for you.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Baker, Steve
Sent: Friday, September 16, 2005 9:39 AM
To: [hidden email]
Subject: [WiX-users] conditional component installation

 

Hi all,

 

I have a web.config for production and for staging. I only want one of them installed.

 

Do I have to create features like the tutorial says or can I just use a condition in each component like this:

 

<Directory Id="TARGETDIR" Name="SourceDir" >

     

      <Component Id="ProductionConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webprod.config" LongName="web.config" Name="WEB.CON" src="UI\webprod.config" />   

            <Condition>NOT STAGING</Condition>

      </Component>

     

<Component Id="StagingConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webqa.config" LongName="web.config" Name="WEB.CON" src="UI\webqa.config" />     

            <Condition>STAGING</Condition>

      </Component>

 

</Directory>

 

Then set the STAGING property when I run the msi?

 

TIA,

 

steve

Reply | Threaded
Open this post in threaded view
|

RE: conditional component installation

Rob Mensching
In reply to this post by Erv Walter

Works fine as long as the Conditions are mutually exclusive.  You will see an ICE warning that says make sure your Conditions are mutually exclusive but that's what the first sentence is all about.  <smile/>

 


From: Erv Walter [mailto:[hidden email]]
Sent: Friday, September 16, 2005 10:41 AM
To: [hidden email]; Baker, Steve; [hidden email]
Subject: RE: [WiX-users] conditional component installation

 

Can you really have two components with the same GUID (as below) but with Conditions to ensure that only one is installed?  I would think WiX or MSI would complain about the GUID reuse.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Mensching
Sent: Friday, September 16, 2005 12:35 PM
To: 'Baker, Steve'; [hidden email]
Subject: RE: [WiX-users] conditional component installation

You can do either.  Whatever works best for you.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Baker, Steve
Sent: Friday, September 16, 2005 9:39 AM
To: [hidden email]
Subject: [WiX-users] conditional component installation

 

Hi all,

 

I have a web.config for production and for staging. I only want one of them installed.

 

Do I have to create features like the tutorial says or can I just use a condition in each component like this:

 

<Directory Id="TARGETDIR" Name="SourceDir" >

     

      <Component Id="ProductionConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webprod.config" LongName="web.config" Name="WEB.CON" src="UI\webprod.config" />   

            <Condition>NOT STAGING</Condition>

      </Component>

     

<Component Id="StagingConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >

            <File Id="webqa.config" LongName="web.config" Name="WEB.CON" src="UI\webqa.config" />     

            <Condition>STAGING</Condition>

      </Component>

 

</Directory>

 

Then set the STAGING property when I run the msi?

 

TIA,

 

steve

Reply | Threaded
Open this post in threaded view
|

Re[2]: conditional component installation

Alexei Boukirev
The potential danger is in "what if condition changes/reverts in subsequent upgrade?"

Friday, September 16, 2005, 1:40:51 PM, you wrote:

> Works fine as long as the Conditions are mutually exclusive.  You will see an ICE
> warning that says make sure your Conditions are mutually exclusive but that's what the first sentence is all about.  <smile/>

> From: Erv Walter [mailto:[hidden email]]
>  Sent: Friday, September 16, 2005 10:41 AM
>  To: [hidden email]; Baker, Steve; [hidden email]
>  Subject: RE: [WiX-users] conditional component installation
>
> Can you really have two components with the same GUID (as below) but with Conditions to
> ensure that only one is installed?  I would think WiX or MSI would complain about the GUID reuse.

> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Rob Mensching
>  Sent: Friday, September 16, 2005 12:35 PM
>  To: 'Baker, Steve'; [hidden email]
>  Subject: RE: [WiX-users] conditional component installation
>  
> You can do either.  Whatever works best for you.

> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Baker, Steve
>  Sent: Friday, September 16, 2005 9:39 AM
>  To: [hidden email]
>  Subject: [WiX-users] conditional component installation
>  
> Hi all,
>  
> I have a web.config for production and for staging. I only want one of them installed.
>  
> Do I have to create features like the tutorial says or can I just use a condition in each component like this:
>
> <Directory Id="TARGETDIR" Name="SourceDir" >
>       <Component Id="ProductionConfiguration"
> Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >
>             <File Id="webprod.config" LongName="web.config" Name="WEB.CON" src="UI\webprod.config" />   
>             <Condition>NOT STAGING</Condition>
>       </Component>
> <Component Id="StagingConfiguration" Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >
>             <File Id="webqa.config" LongName="web.config" Name="WEB.CON" src="UI\webqa.config" />     
>             <Condition>STAGING</Condition>
>       </Component>
> </Directory>
>
> Then set the STAGING property when I run the msi?
>
> TIA,
>
> steve

--
Best regards,
 Alexei




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

RE: Re[2]: conditional component installation

Rob Mensching
Condition will only affect the Component state if the Component is marked
Transitive.  In either case, you should be able to get the behavior you
want.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Alexei Boukirev
Sent: Friday, September 16, 2005 12:10 PM
To: [hidden email]
Subject: Re[2]: [WiX-users] conditional component installation

The potential danger is in "what if condition changes/reverts in subsequent
upgrade?"

Friday, September 16, 2005, 1:40:51 PM, you wrote:

> Works fine as long as the Conditions are mutually exclusive.  You will see
an ICE
> warning that says make sure your Conditions are mutually exclusive but
that's what the first sentence is all about.  <smile/>

> From: Erv Walter [mailto:[hidden email]]
>  Sent: Friday, September 16, 2005 10:41 AM
>  To: [hidden email]; Baker, Steve;
[hidden email]
>  Subject: RE: [WiX-users] conditional component installation
>
> Can you really have two components with the same GUID (as below) but with
Conditions to
> ensure that only one is installed?  I would think WiX or MSI would
complain about the GUID reuse.

> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Rob Mensching
>  Sent: Friday, September 16, 2005 12:35 PM
>  To: 'Baker, Steve'; [hidden email]
>  Subject: RE: [WiX-users] conditional component installation
>  
> You can do either.  Whatever works best for you.

> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Baker, Steve
>  Sent: Friday, September 16, 2005 9:39 AM
>  To: [hidden email]
>  Subject: [WiX-users] conditional component installation
>  
> Hi all,
>  
> I have a web.config for production and for staging. I only want one of
them installed.
>  
> Do I have to create features like the tutorial says or can I just use a
condition in each component like this:
>
> <Directory Id="TARGETDIR" Name="SourceDir" >
>       <Component Id="ProductionConfiguration"
> Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >
>             <File Id="webprod.config" LongName="web.config" Name="WEB.CON"
src="UI\webprod.config" />   
>             <Condition>NOT STAGING</Condition>
>       </Component>
> <Component Id="StagingConfiguration"
Guid="A68697CE-14C4-4635-B239-116D0FBEA3C1" DiskId="1" >
>             <File Id="webqa.config" LongName="web.config" Name="WEB.CON"
src="UI\webqa.config" />     
>             <Condition>STAGING</Condition>
>       </Component>
> </Directory>
>
> Then set the STAGING property when I run the msi?
>
> TIA,
>
> steve

--
Best regards,
 Alexei




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users