Hi,
I'm trying to remember list of all the installed features so
after a major upgrade the user end up with the same features
as selected in the original installation. To acomplish this
I save the ADDLOCAL property to registry and then read it
using RegistrySearch during major upgrade.

Sadly, there are some probelsm:
a) When user changes the installation, the new ADDLOCAL
value is not saved. I've "solved" this by forcing the
registry component to reinstall... I'm not sure, if this is
the proper way whough.

b) Whn user repairs the installation the registry entry is
cleared! I know from the Log file that the ADDLOCAL property
contained the right values, but it is not saved. I don't
have a solution for this.

My questions are: 
1) How to properly remember the list of installed features? 
2) How can I properly update this list when the user
installs/removes some features in Maintance mode? 
3) How can I preserve the list during installation repair?

My WiX code:
<!-- Save the list -->
<Component Id="FeatureList"
Guid="2c7cb837-6242-4db3-981e-bcf8ade51b53">
  <RegistryValue Root="HKLM" Key="Software\Fine\ProductInfo"
Name="FeatureList" Type="string" Value="[ADDLOCAL]"
KeyPath="yes" /> 
</Component>
<!-- Read the list -->
<Property Id="ADDLOCAL">
  <RegistrySearch Id='FeatureRegSearch' Type='raw'
Root='HKLM' Key='Software\Fine\ProductInfo'
Name='FeatureList' />
</Property>
<!-- "Core" component with the FeatureList - installed
always -->
<Feature Id="Core" Title="Core" Level="1" Display="hidden"
AllowAdvertise="no" Absent="disallow">
  <ComponentRef Id="FeatureList" />
</Feature>

<!-- HACK: Reinstall the Core component in Maintaince mode
-->
<CustomAction Id="SetReinstallCore" Property="REINSTALL"
Value="Core" Execute="immediate" />

<InstallExecuteSequence>
  <Custom Action="SetReinstallCore"
Before="CostFinalize">Installed AND NOT RESUME AND NOT
Preselected</Custom>
</InstallExecuteSequence>

<InstallUISequence>
  <Custom Action="SetReinstallCore"
Before="CostFinalize">Installed AND NOT RESUME AND NOT
Preselected</Custom>
</InstallUISequence>

Thank you 
Ondrej Zarevucky

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to