-
Major Upgrade fails to complete after uninstalling previous product version
I am working with a Major install, and want to upgrade an existing product with the Upgradecode...
{98EA1BC2-7EAE-47F4-9A22-37D0C116227A}
but after installing the original version of my product, I look in \\hkcr\installer\upgradecodes expecting to see something named appropriately, but instead find a key named:
9c0121f80a833d11581e000540386890
that contains a String Value:
0b79c053c7d38ee4ab9a00cb3b5d2472
Obviously, when I install my new version of the product, it fails to detect the existing product since the upgradecodes dont match. If I look in the .msi for both installations, the upgrade codes are identical.
After reading some posts, I thought that maybe the 0b79c053c7d38ee4ab9a00cb3b5d2472 guid was a ‘packed’ version of the real upgradecode, so I added it to the upgrade table in this format...
{0B79C053-C7D3-8EE4-AB9A-00CB3B5D2472}
...and now the old version of my product is being detected by my new install. Unfortunately, after the old product is uninstalled by the new product and I am ready to launch the new version of the product from the start menu to complete the Major upgrade process, none of my .dlls are being installed in ..\program files\myproduct\bin and the newly installed version of the product fails citing a missing .dll in the previous location.
Is there any way to log the upgrade process to see what is or isnt happening?
-
The upgrade code stored in the registry is in packed format.
The value under this key is the Prodcut Code, also in packed format.
Your install should remove the old version, and install the new version all in one go. You should no need to launch the other install from the start menu..
anyway, to log the install use
msiexec /I "msifile.msi" /L*V c:\msi_log.txt
if you are using setup.exe with an embedded msi file, then you need to pass setup.exe the parameters
setup.exe /v"/L*V c:\msi_log.txt"
-
I understand how to log an install, what I cant do is log a Major upgrade after the previous version of the product was uninstalled. For instance, If I log an install that performs a major installation, my log file gets all of the events performed by MSI until the Upgrade silently uninstalls my existing product. Once the silent uninstallation portion of the major upgrade is performed, logging stops.
I need to log the events that occur the first time I launch the shortcut to the newly installed version of my product, but since the installation is 'done', I cannot log this to see why my .dlls arent being copied.
Anyway, I decided to just detect and remove the old version of my product with a custom action in my new product. That should do the trick.
-
In your major upgrade, if you are using RemoveExistingProducts, information about this install should be logged to the main install log.
As a last restort, i add debug information into the cached msi package for the version that will be remove in the major upgrade.
-
I've got it figured out...hopefully this will help anyone else who sees this behavior. Version 6.0 and 6.0.1 of my product share an UPGRADECODE GUID of
{98EA1BC2-7EAE-47F4-9A22-37D0C116227A}, but when I install version 6.0, a packed version of the UPGRADECODE GUID is written to the registry like this...
\\hkcr\installer\upgradecodes\{2CB1AE89-EAE7-4F74-A922-730D1C6122A7}
instead of the expected....
\\hkcr\installer\upgradecodes\{98EA1BC2-7EAE-47F4-9A22-37D0C116227A}
So, in the upgrade table of my project, I added the packed version of my UPGRADECODE GUID '{2CB1AE89-EAE7-4F74-A922-730D1C6122A7}' to my MSI database in addition to the existing upgrade code '{98EA1BC2-7EAE-47F4-9A22-37D0C116227A}', and now the upgrade is working as expected. I believe I mistakenly grabbed an UPGRADECODE GUID that was present on my test box, but didnt actually contain the PRODUCTCODE GUID of my product which resulted in version 6.0 being uninstalled, but the new 6.0.1 files not being reinstalled.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules