Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Major upgrade leaves old entry in Add/Remove.


6 replies to this topic

TimBit

TimBit
  • Full Members
  • 4 posts

Posted 18 September 2006 - 19:43

We are using InstallShield 12 to create a Major Upgrade (updated the Version Number, Product Code and Package Code - the upgrade code remains the same).
After running the major upgrade, we are left with two entries in the Control Panels-> Add/Remove Programs.
Monitoring the major upgrade, we notice that it is in fact performing an uninstall and then a new install, which is exactly what we require. But the uninstall event that is triggered during an upgrade is behaving differently than performing a regular uninstall,
i.e. in our OnInstall() function, we call some specific functions to remove desktop icons.
Those do not get cleaned up during a major upgrade.

Apart from that, the major upgrade does seem to install the new files.
Uninstalling the major upgrade also uninstalls cleanly (i.e. Control Panels->Add/Remove entry and desktop icons are removed).

1. Does anyone know what event handler is used during a major upgrade?
2. Why do we have the original product entry left in the Control Panels->Add/Remove?
3. Does anyone have detailed instructions on creating major upgrade and how they work?

Thank you in advance.



Rick

Rick
  • Members
  • 8 posts

Posted 03 October 2006 - 22:36

I have been having the same problem. I added a custom action that displays the value of the property stuffed by FindRelatedProducts and it seems to be working correctly.

It's as if the original product is not getting uninstalled at all.

Rick

TimBit

TimBit
  • Full Members
  • 4 posts

Posted 03 October 2006 - 23:12

QUOTE (Rick @ 2006-10-03 22:36)
I have been having the same problem. I added a custom action that displays the value of the property stuffed by FindRelatedProducts and it seems to be working correctly.

It's as if the original product is not getting uninstalled at all.

Rick

Our installer was uninstalling cleanly except for that entry left in the Control Panels.
We ended up writing a custom action to be executed after RemoveExistingProducts.
That custom action basically removed the entries from the registry.
Here is the code for our custom action:

export prototype CustomOnUninstall(HWND);


function CustomOnUninstall(ISMIS_HANDLE)
STRING szPreviousProductCode;
NUMBER nSize, nReturn;

begin
nSize = 256;
nReturn = MsiGetProperty(ISMSI_HANDLE, "ISACTIONPROP1", szPreviousProductCode, nSize);
if ( nReturn == ERROR_SUCCESS) then
if (szPreviousProductCode != "" ) then
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
nReturn = RegDBDeleteKey("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + szPreviousProductCode );
nReturn = RegDBDeleteKey("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Installshield Uninstall Information\\" + szPreviousProductCode );
nReturn = RegDBDeleteKey("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Installshield_" + szPreviousProductCode);
endif;
elseif (nReturn == ERROR_INVALID_HANDLE ) then
MessageBox("MsiGetProperty returned error_invalid_handle", INFORMATION);
elseif (nReturn == ERROR_MORE_DATA) then
MessageBox("MsiGetProperty returned error_more_data", INFORMATION);
else
MessageBox("MsiGetProperty returned error_invalid_parameter", INFORMATION);
endif;
end;


Hope this helps anyone else out there.



vishalv

vishalv
  • Full Members
  • 39 posts

Posted 20 October 2006 - 16:58

Hi,
I am also facing a similar problem. However some of the jar and the jsp files are not getting overwritten. So I want to delete them after the RemoveExistingProducts CA is run during a major upgrade
It would be helpful if you can specify the place where this CA was placed and what was the condition that was used to run the CA in case of a major upgarde only.

I am kind of stuck here. Help is greatly appreciated.

Thanks,
Vishal

TimBit

TimBit
  • Full Members
  • 4 posts

Posted 20 October 2006 - 18:43

Hi Vishal,

Our CA was placed after the RemoveExistingProducts. The condition in the CA which will make it run only during a major upgrade is the bit where we check for szPreviousProductCode is not empty. i.e. if it is not empty then it means that a previous product was found and a major upgrade is taking place, otherwise if it's empty then we are not in a major upgrade mode.


Hope this helps.

Thanks,



wleara

wleara
  • Full Members
  • 11 posts

Posted 09 January 2007 - 22:47

I too have this same problem. There are zero errors in the MSI log after the major upgrade. The uninstall of the older version seems to be executed successfully, but then there are two entries in Add/Remove Pgms.

The problem with TimBit's CA is that it won't remove the MSI config data. To Windows Installer, the older product is still installed, which might create problems.

Hopefully someone knows why this is happening?

wleara

wleara
  • Full Members
  • 11 posts

Posted 10 January 2007 - 05:51

Update from me: after further review, I fixed my problem my editing the Upgrade Table to correct values.