I ran into this issue in the past and couldn't quite figure out what is the cause of the problem. But looking at your re-pro steps, looks like simply having a file being present in the "INSTALLLOCATION" root directory would force the INSTALLLOCATION to be properly updated. I'm wondering if you go back to your original complicated project and try to inject a dummy file to the INSTALLLOCATION root directory, would that also force the INSTALLLOCATION property to be updated in your original project? Just wondering.
John Leung -----Original Message----- Message: 3 Date: Tue, 8 Mar 2011 10:31:20 +0100 From: MeCoco <vcotirl...@hotmail.com> Subject: Re: [WiX-users] INSTALLLOCATION wrong value during uninstall (has the default value, not the used one) To: "General discussion for Windows Installer XML toolset." <wix-users@lists.sourceforge.net> Message-ID: <blu0-smtp2092d3c38f74d0d7bc3bdd483...@phx.gbl> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Hi all, I tried to create a small sample to reproduce the problem I'm having, and after a lot of tries I managed to reproduce it. The problem is described extensivly in my previous email, but a summary would be: if the user, when installing, changes the default directory (eg: from C:\Program Files\... to Z:\Program Files\...), then on uninstall (only real uninstall, not updates) one can see in the verbose log file that the INSTALLDIR property is set wrong to the default value (eg: C:\Program Files\...) and not to the folder where the user really installed the product (eg: Z:\Program Files\...) HOW to reproduce the problem: 1) If in the code I have the following: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="$(var.InstallDirectoryName)"> <Component Id="MyDoc.txt" Guid="6817A42D-30E7-464C-99DC-8FDBED6D70C6"> <File Id="MyDoc.txt" Source="MyDoc.txt" KeyPath="yes" Checksum="yes" /> </Component> <Directory Id="Modules" Name="Modules"> <Component Id="MyLogo.txt" Guid="68C1561C-85F8-4E2F-81F4-41DDDBE35DDB"> <File Id="MyLogo.txt" Source="MyLogo.txt" KeyPath="yes" Checksum="yes" /> </Component> </Directory> </Directory> </Directory> </Directory> <!-- application features --> <Feature Id="Application" Title="$(var.ProductName) Application" Level="1" Absent="disallow"> <ComponentRef Id="MyLogo.txt" /> <ComponentRef Id="MyDoc.txt" /> </Feature> I get everything correct, meaning I have in the log file the following: MSI (s) (08:24) [10:13:46:801]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'Z:\Program Files\MyTestInstallDirectory'. MSI (s) (08:24) [10:13:46:801]: PROPERTY CHANGE: Adding Modules property. Its value is 'Z:\Program Files\MyTestInstallDirectory\Modules'. 2) BUT, if in the code the MyDoc.txt component is missing, the INSTALLDIR property is wrong. So, for the code: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="$(var.InstallDirectoryName)"> <Directory Id="Modules" Name="Modules"> <Component Id="MyLogo.txt" Guid="68C1561C-85F8-4E2F-81F4-41DDDBE35DDB"> <File Id="MyLogo.txt" Source="MyLogo.txt" KeyPath="yes" Checksum="yes" /> </Component> </Directory> </Directory> </Directory> </Directory> <!-- application features --> <Feature Id="Application" Title="$(var.ProductName) Application" Level="1" Absent="disallow"> <ComponentRef Id="MyLogo.txt" /> </Feature> In the log file I can see: MSI (s) (08:B0) [10:16:49:444]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'C:\Program Files\MyTestInstallDirectory\'. MSI (s) (08:B0) [10:16:49:444]: PROPERTY CHANGE: Modifying Modules property. Its current value is 'Z:\Program Files\MyTestInstallDirectory\Modules'. Its new value: 'Z:\Program Files\MyTestInstallDirectory\Modules\'. Is this a bug or am I doing something wrong? I think in both cases the INSTALLDIR should have the correct value (Z:\Program Files\...) on uninstall. Any tip is appreciated. Thank you, MeCoco ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users