Hi,
I would like my MSI package to uninstall previous versions before installing a new version of the same software. Currently the MSI package does not and this leaves MyApp listed in the Add/Remove Programs list, along with old version files & shortcuts on the target machine.
I use VB 6 sp5 to create the application. Then Visual Studio 6.0 creates the MSI setup file. The problem is that no matter what I set for the Product Code (Upgrade Code always stays the same) and Version Number, every different version of MyApp creates another entry in the Add/Remove programs list and never removes the previous version.
Is it possible to get a new version of MyApp to uninstall the old version first?
Tools we have
VB 6 sp5
VS 6.0 Installer
Orca version 1.2 and 2.0
Thank you
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.
Uninstall old version of new application
Started by
kellc
, Jan 26 2004 00:17
7 replies to this topic
Posted 26 January 2004 - 01:07
You need to populate the "Upgrade" table in your MSI file. For information on how to do this check the Windows Installer SDK: http://msdn.microsof..._an_upgrade.asp
Regards
-Stein Åsmul
-Stein Åsmul
Posted 26 January 2004 - 03:59
Thank you for the link and the reply. I apoligize for the ignorance with what seems like a simple task but three days of experimenting and going through MSDN has not helped. Maybe this can not be done with simply VS 6.0 and Orca 2.0?
Here is what I have tried, but I still get duplicate entries in the Add/Remove programs when trying to upgrade my program.
Upgrade Table...
UpgradeCode:{52F6B760-0C48-48B6-A6E1-51D00FEB1EC7}
VersionMin:
VersionMax:2.9.9
Language:
Attributes:1
Remove:
ActionProperty:DATALOGUPGRADE
Property Table (not all properties listed)...
PropertyCode:{42A05EBC-5D11-4AEC-AC0D-2277D1E02595}
UpgradeCode:{52F6B760-0C48-48B6-A6E1-51D00FEB1EC7}
ProductVersion:3.0.0.0
SecureCustomProperties:DATALOGUPGRADE
InstallExecuteSequence Table (not all rows listed)...
Action: RemoveExistingProducts
Condition:
Sequence: 6700
Thank you,
Here is what I have tried, but I still get duplicate entries in the Add/Remove programs when trying to upgrade my program.
Upgrade Table...
UpgradeCode:{52F6B760-0C48-48B6-A6E1-51D00FEB1EC7}
VersionMin:
VersionMax:2.9.9
Language:
Attributes:1
Remove:
ActionProperty:DATALOGUPGRADE
Property Table (not all properties listed)...
PropertyCode:{42A05EBC-5D11-4AEC-AC0D-2277D1E02595}
UpgradeCode:{52F6B760-0C48-48B6-A6E1-51D00FEB1EC7}
ProductVersion:3.0.0.0
SecureCustomProperties:DATALOGUPGRADE
InstallExecuteSequence Table (not all rows listed)...
Action: RemoveExistingProducts
Condition:
Sequence: 6700
Thank you,
Posted 26 January 2004 - 05:09
In addition to what I posted, changes to the following tables were also made and then I did see an uninstall happen. I believe everything works now (will test more later).
InstallUISequence Table...
Action: FindRelatedProducts
Condition:
Sequence: 200
ActionText Table..
Action: FindRelatedProducts
Description: Searching for related applications
Template:Found application: [1]
InstallExecuteSequence Table...
Action:FindRelatedProducts
Condition:
Sequence 200
Thank you for the help and the review of these changes
InstallUISequence Table...
Action: FindRelatedProducts
Condition:
Sequence: 200
ActionText Table..
Action: FindRelatedProducts
Description: Searching for related applications
Template:Found application: [1]
InstallExecuteSequence Table...
Action:FindRelatedProducts
Condition:
Sequence 200
Thank you for the help and the review of these changes
Posted 26 January 2004 - 07:16
It is late here, but your changes look correct. A major upgrade is based on the upgrade code, requires a populated upgrade table that specifies the upgrade code (GUID), the FindRelatedProducts will find installed products with the same upgrade code as the product you install and the RemoveExistingProducts will remove that already installed product.
Regards
-Stein Åsmul
-Stein Åsmul
Posted 30 January 2004 - 22:01
This is one of the most frequently asked questions. I know it was one of my first posts. Just too bad it isn't easily found in the documentation.
Jeff Clark - MCSD BMWFS
Posted 09 February 2004 - 03:36
I had to move RemoveExistingProducts from 6700 to 1450. I found testing on Windows 95 machines that parts of the new product would be uninstalled at the end of the installation. This did not happen on W2k, XP home and Pro, ME, or Win 98 just with Windows 95.
Ref.
http://msdn.microsof...ucts_action.asp
Ref.
http://msdn.microsof...ucts_action.asp
Edited by kellc, 09 February 2004 - 03:40.