Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > RemoveExistingProduct + Major Upgrade
 

RemoveExistingProduct + Major Upgrade

Hello All,

I am doing an major upgrade from version A to version B in IS 7.

Now during upgrade , version b tries to uninstall version A. On uninstall, it runs uninstallation script for version A. This uninstallation script has messagbox which it will display. We do not want to show these messagebox.


Is there any way we can suppress messagebox from old product which is getting uninstalledwhile major ugrade ??


Thanks,
Amit
Amit Mutha  Wednesday, January 07, 2009 7:04 AM
Hi Amit,

>On uninstall, it runs uninstallation script for version A.

Is the uninstallation script added by Install Shield to the MSI package? What's the content of this uninstallation script?

> This uninstallation script has messagbox which it will display

When will the messagebox display? What information will this messagebox show?

I am not familiar with Install Shield, but if we use Visual Studiotogenerate an MSIpackage which willdo a major upgrade, when installing, the existing old products will be removed silently first and then the new product is installed on the target machine.

The MSI package uses a standard action called "RemoveExistingProducts" to remove the existing old products. The RemoveExistingProducts action is included inthe InstallExecuteSequencetable. You may have a try openingyour MSI package with the tool Orca to see if there's the action RemoveExistingProducts is included in the InstallExecuteSequence table.

Hope this helps.

Linda

Linda Liu  Thursday, January 08, 2009 4:57 AM
Hi Linda,

The messagebox is written in OnBegin event of uninstallation script and it is written by us only.

When we uninstall the software through Add/Remove , This will be not displayed. But the same will be displayed when we do upgrade.

if (FeatureSetData(MEDIA,"ToCheckWin2003",FEATURE_FIELD_SELECTED,TRUE,szData) < 0 ) then
MessageBox("Error in Deselecting feature", INFORMATION);
endif;

Can you tell me what can be reason to fail FeatureSetData on uninstallation script while upgrade ??

Thanks,
Amit
Amit Mutha  Thursday, January 08, 2009 9:06 AM
Hi Linda / ALL,

The functionFeatureSetData fails with error -132.
This function fails only on upgrade and not when i uninstall application through Add/Remove program

The error -132 means - The specified media can not be found

Thanks,
Amit
Amit Mutha  Thursday, January 08, 2009 10:55 AM

Hi Amit,

You may use the standard property UPGRADINGPRODUCTCODE as a condition on the uninstallation script.
FYI, the UPGRADINGPRODUCTCODE property means the product is being removed because of a major upgrade. Windows Installer sets this property to the ProductCode GUID of the product that's replacing it, and it isn't set during a remove from Add/Remove Programs or any other type of standalone uninstall.

Hope this helps.

Sincerely,
Linda Liu

Linda Liu  Tuesday, January 13, 2009 7:08 AM

You can use google to search for other answers

Custom Search

More Threads

• Direct SQL instead of webservice
• How to make IDesignerHost implementation read only, in Designer Host Sample?
• Problem with Concurrency Checking
• When's Terrarium going to work?
• Updating & adding Tasks from the PocketPC version
• Suggestions
• write transaction
• The small report screen doesn't work
• VB Documentation
• Live Stats Page Down?