Hello,

I am fairly new to WiX. I have an installer which installs "standard" 
components and has one optional feature, "feature X". If I run the installer 
everything works as expected for a basic install with or without feature X 
included. If I run the installer again and select "Change" in maintenance mode 
and then remove feature X only then it properly removes feature X.

However, suppose I run the installer and choose not to install feature X. That 
works properly. Then suppose I run the installer again and select "Change" and 
choose to add feature X. Feature X does install, but not all the components go 
where I expect them to (or even where they go when I just do a full install 
with feature X included). The components in feature X are all supposed to get 
installed under a third-party application which is detected using a 
RegistrySearch. To get the files to install under the third-party application, 
I have a structure such as:

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

     ... there are more levels in the directory structure for Program 
Files\Manufacturer\Product, but I omitted them here...

     <Directory Id="THIRD_PARTY_PATH" Name="third-party">
     
         <Directory Id="dir32_examples" Name="examples">

              <Directory Id="dir32_exbins" Name="exbins">

                    <Component Id="cmp32_bin3" Guid="{PUT-GUID-HERE}" 
Win64="$(var.Win64)">
                        <File Id="fil32_bin3" Source="<path to source>" />
                        <Condition>Installed OR THIRD_PARTY_PATH</Condition>
                    </Component>

              </Directory>

              <Directory Id="dir32_examples_visualization" Name="Visualization">

                    <Component Id="cmp32_visual" Guid="{PUT-GUID2-HERE}" 
Win64="$(var.Win64)">
                        <File Id="fil32_visual" Source="<path to source>" />
                        <Condition>Installed OR THIRD_PARTY_PATH</Condition>
                    </Component>

              </Directory>

          </Directory>

     </Directory>

</Directory>

where THIRD_PARTY_PATH is set using a RegistrySearch. Both components belong to 
the optional feature X. However, when using "Change" in maintenance mode to add 
feature X, the cmp32_bin3 component gets installed under the THIRD_PARTY_PATH 
(C:\Program Files\ThirdPartyProduct), while cmp32_visual gets installed under 
the TARGETDIR path (C:\Program Files\MyProduct). Both components were not 
installed before I did the Change update (i.e. after only installing the 
product with feature X excluded).

I don't get it. If THIRD_PARTY_PATH were not being defined properly because of 
Maintenance mode, then surely both components would end up under the TARGETDIR 
path. If THIRD_PARTY_PATH does get defined properly then both components should 
end up under the THIRD_PARTY_PATH, should they not? I am puzzled as to how the 
two components can end up in two different places!

What rules does the Windows Installer use to determine where files go in 
Maintenance mode? Could I have some left-over registry entries from prior 
install attempts that need to be cleaned up? If so, where do I find them (I've 
searched for component GUIDs in the registry and not found them)?

Any help would very much be appreciated.

Daniel Madill

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to