Hi all,
I came across a problem with my installer. WiX sources contents below:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="TDIR" Name="ATestFolder">
<Directory Id="SubFolder1" Name="SubDir">
<Component Id="ProductComponent1"
Guid="ac926312-821b-4e25-a9b1-d9797f2bb64c">
<File Id="file" Name="APP.INI" KeyPath="yes"
Source="P:\Setup\Tests\WixProject1\APP.INI"/>
</Component>
<Component Id="ProductComponent2"
Guid="{D047EA0C-67EF-4691-AA4F-0BDE897BE02F}">
<RegistryKey Id="id1" Action="create" Root="HKLM" Key="Software\ATest">
<RegistryValue Id="id2" Action="write" Name="Test" Type="string"
Value="[TDIR]" KeyPath="yes"/>
</RegistryKey>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="Main feature" Level="1"
ConfigurableDirectory="TDIR">
<ComponentRef Id="ProductComponent1" />
<ComponentRef Id="ProductComponent2" />
</Feature>
As you can see, I have two components - a file and a registry value.
The file gets installed in [TDIR]\Subdir folder.
The registry entry will contain [TDIR].
My problem is that on "Repair" , the registry entry is set to the default name
of TDIR, even if this folder was customized at install time.
I made some tests and discovered that this DOES NOT happen when the [TDIR]
folder contains a file (I added a new component under TDIR with a file as
KeyPath).
Can anybody help me with this problem ? I failed to find something about this
behavior in MSI docs and do not really understand why the folder name is set
back to default unless the folder actually contains an installed file.
I tried to move the component which writes the registry value directly under
TDIR, but this did not help, the folder name is set back to default... Does not
seem to work except if a File or IniFile entry exists for this folder in a
component...
I can workaround this problem by scheduling save [TDIR] / restore TDIR standard
custom actions, but I find the need for an workaround a bit rude...
At least I want to understand why this happens and if it's a documented issue,
or if other solutions exist except custom actions or installing not needed
files.
Thanks,
Adrian
____________________________________________________________________________________
Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users