1
votes

First of all, I've tried to find explanations on several forums but I didn't found a topic that might explain the behavior observed.
In advance, I apologize if I missed one.


The observed behavior:

When upgrading product with a new installer, prior installation is not always removed correctly.


What changed between previous and current installer wix setup project:

  • The previous product installer was installing under Directory <DirectoryId="ProgramFiles64Folder">
  • The new installer has been updated is installing under <Directory Id="ProgramFilesFolder">
  • Checking for .Net framework 4.5 or newer installed
  • Use <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />

When I upgrade product on my computer (Windows 10 - 64 bits OS) everything works fine:

  1. Previous product installed under "C:\Program Files\" is uninstalled correctly - See logs extract:

RemoveExistingProducts: Application:{F6E83B3C-CA4D-4FE2-BB54-4D5156D9EB98}, Command line: UPGRADINGPRODUCTCODE={DB2D1294-EA5F-4BEF-BFBC-A236E0DCDEB3} CLIENTPROCESSID=21584 CLIENTUILEVEL=0 REMOVE=ALL

  1. New product is correctly installed under "C:\Program Files (x86)\"

But on other hand, a user has encountered a problem: previous product is not uninstalled (Windows 7 - 64 bits OS)

  1. What I can see when upgrading with verbose logs is that previous version is found:

RemoveExistingProducts: Application: {F6E83B3C-CA4D-4FE2-BB54-4D5156D9EB98}, Command line: UPGRADINGPRODUCTCODE={E71A5696-B038-4EEE-9B4A-DE0A3D84045E} CLIENTUILEVEL=0 REMOVE=ALL

  1. When CostFinalize sequence is started to remove existing product, directory structure location is changed to "C:\Program Files (x86)\" where product is not yet installed:

MSI (s) (6C:60) [12:17:56:505]: PROPERTY CHANGE: Modifying ProgramFiles64Folder property. Its current value is 'C:\Program Files\'. Its new value: 'C:\Program Files (x86)\'.

MSI (s) (6C:60) [12:17:56:505]: PROPERTY CHANGE: Adding CompanyDIR property. Its value is 'C:\Program Files (x86)\Company\'.

MSI (s) (6C:60) [12:17:56:505]: WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\Company\Company Product\' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).

MSI (s) (6C:60) [12:17:56:505]: PROPERTY CHANGE: Modifying INSTALLFOLDER property. Its current value is 'C:\Program Files\Company\Company Product'. Its new value: 'C:\Program Files (x86)\Company\Company Product\'.

  • I have the complete upgrade log files (the one working and the other failing)
  • I can give you more details if needed on the wix file.wxs used to generate msi

Questions:

  1. Has anyone faced a such behavior ?
  2. Is the only solution to uninstall prior version and install the new one ?

In advance, thanks to all !

1

1 Answers

0
votes

Did you followed the component guid change guidelines?

https://msdn.microsoft.com/en-us/library/windows/desktop/aa367849(v=vs.85).aspx

When you change the folder/name you had to change the guid's.