> Date: Tue, 25 Nov 2008 22:33:26 -0500
> From: "Gavin Bee" <[EMAIL PROTECTED]>
> Subject: Re: [WiX-users] Reinstall a component during "Change" install

> Would doing the following work?
> * Create a feature that contains all of the components that you might want
> to reinstall
> * Set REINSTALL=FeatureX during a "Change" install
> * Add conditions to the components that cause them to be included (or not)
> depending on the appropriate feature states.  This might be hard if you
> already have component conditions.
>
> This seems like it should work to me, but I have not tried it.

Thanks for your reply Gavin.

I haven't tried your suggestion to change the component conditions because I'm 
assuming that if a component not set to "Action: Local" or "Action: Reinstall", 
then the condition won't matter.

I resolved my situation by;

1) Setting a property to indicate if a feature is already installed by doing a 
RegistrySearch

e.g.
  <Property Id="FEAT1">
    <RegistrySearch Root="HKLM" Key="$(var.RegPathFeat1)" Name="my_value" 
Id="propFindFeat1" Type="raw" />
  </Property>


2) Modifying the condition on the custom actions that set REINSTALL to ensure 
that the REMOVE property doesn't contain the feature (in case user chose to 
remove it) and that the FEATX property was found/set.

e.g.
  <Custom Action="BOTH_SetREINSTALL" Before="CostInitialize">Installed and NOT 
REINSTALL AND (NOT REMOVEALL~="ALL") AND (NOT (REMOVE&gt;&lt;"$(var.Feat1)")) 
AND (NOT (REMOVE&gt;&lt;"$(var.Feat2)")) AND FEAT1 AND FEAT2</Custom>
  <Custom Action="Feat1_SetREINSTALL" After="BOTH_SetREINSTALL">Installed and 
NOT REINSTALL AND NOT REMOVEALL ~= "ALL" AND (NOT 
(REMOVE&gt;&lt;"$(var.Feat1)")) AND FEAT1</Custom>
  <Custom Action="Feat2_SetREINSTALL" After="Feat1_SetREINSTALL">Installed and 
NOT REINSTALL AND NOT REMOVEALL ~= "ALL" AND (NOT 
(REMOVE&gt;&lt;"$(var.Feat2)")) AND FEAT2</Custom>

This seems like a pretty convoluted mess, but it works! ;-)

Thanks again for your reply and your original post.

Dale


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to