This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Product Upgrade Problem
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2009
04:00 AM
Product Upgrade Problem
Hi,
I am trying to upgrade an existing setup with new setup built with InstallShield 2009 but i cannot make setup to upgrade existing installation and need help for this.
I have an old setup project implemented with IS 11 or 12 (dont know). Now i am using IS 2009 and trying to build setup project. As a requirement i need to upgrade existing installation on our customer's computers. So i implemented same setup with InstalScript MSI project type (which has upgrade feature unlike InstallScript project type). When i try to convert project with IS 2009, project is converted to InstallScript type project which doesnot have upgrade feature. I set the product GUID to old product GUID to support upgrade feature in new project.
I thought same product GUID setups would realize they are same product and would try to upgrade but upgrade process doesnot start and setup tries to install from fresh in new setup. I think old installation cannot be detected even if it has same product GUID.
Is there a way to detect old installation and execute upgrade process (either automatically or from script manually)?
Thanks in Advance,
Ugur
I am trying to upgrade an existing setup with new setup built with InstallShield 2009 but i cannot make setup to upgrade existing installation and need help for this.
I have an old setup project implemented with IS 11 or 12 (dont know). Now i am using IS 2009 and trying to build setup project. As a requirement i need to upgrade existing installation on our customer's computers. So i implemented same setup with InstalScript MSI project type (which has upgrade feature unlike InstallScript project type). When i try to convert project with IS 2009, project is converted to InstallScript type project which doesnot have upgrade feature. I set the product GUID to old product GUID to support upgrade feature in new project.
I thought same product GUID setups would realize they are same product and would try to upgrade but upgrade process doesnot start and setup tries to install from fresh in new setup. I think old installation cannot be detected even if it has same product GUID.
Is there a way to detect old installation and execute upgrade process (either automatically or from script manually)?
Thanks in Advance,
Ugur
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2009
04:15 AM
Normally when we say upgrade, we mean major upgrade, that is to say to uninstall old one and reinstall new one. Is this what you mean for upgrade? With this idea, you can detect the old version from registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{your product id}. if this entry exists, the old product has already existed. there is a string value "UninstallString" under this entry, which can be used to launch the uninstallation process.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2009
05:07 AM
irenejia wrote:
Normally when we say upgrade, we mean major upgrade, that is to say to uninstall old one and reinstall new one. Is this what you mean for upgrade?
No. With upgrade i mean the "Upgrading Product X from v12 to v14" screen. I think it uninstalls old product and installs new product (default option) in background but shows "Upgrading" dialog.
From v12.0.0.1 to v14.0.0.1 is a major upgrade but also from v14.0.0.1 to v14.0.0.2 should be an upgrade too. As far as i remember if i rebuilt the new setup, it can handle this build version change and starts upgrade process.
irenejia wrote:
With this idea, you can detect the old version from registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{your product id}. if this entry exists, the old product has already existed.
Old setup puts info to that location, yes, it exists. But new setup doesnot or cannot detect this.
irenejia wrote:
there is a string value "UninstallString" under this entry, which can be used to launch the uninstallation process.
I saw now but i need to upgrade in a way, uninstall is not a good solution for me because this string started removal process. I need to start upgrade process.
Thanks,
Ugur
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 21, 2009
07:49 AM
Here is a workaround for my problem if anyone also needs solution.
In "OnFirstUIBefore" function i added below script:
Besides this workaround i still need a better solution.
Thanks
Ugur
In "OnFirstUIBefore" function i added below script:
RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );
szInstallKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{PRODUCTGUID}";
//: UgurG: uninstall old setup manually if exists
if( !REMOVEONLY ) then
//: UgurG: get existing installation registry key if exists
nResult = RegDBKeyExist( szInstallKey );
//: another installation exists, check its version
if( nResult = 1 ) then
nResult = RegDBGetKeyValueEx( szInstallKey , "Version" , nKeyType , szInstalledVersion , nInstalledVersionLength );
if( nResult = 0 ) then
StrToNum( nVersion, szInstalledVersion);
//: XYZ is version value for version P (0XYZ000000)
//: New setup supports higher versions than 'P', for older versions than 'P' i need to remove them manually on new product installation
if( nVersion >= XYZ ) then
goto Dlg_SdWelcome;
endif;
endif;
//: UgurG: get uninstall command from registry to uninstall old version
nResult = RegDBGetKeyValueEx( szInstallKey , "UninstallString" , nKeyType , szUninstallKey , nUninstallKeyLength );
if( nResult = 0 ) then
//: UgurG: in case of an error check uninstall string length
nResult = StrLength(szUninstallKey);
if( nResult >0 ) then
//: remove first "rundll32" from uninstall string
StrSub( szUninstallArgs, szUninstallKey, 9, StrLength(szUninstallKey) );
//: execute uninstall application
LaunchApplication( "rundll32", szUninstallArgs, "", SW_SHOWNORMAL, LAAW_PARAMETERS.nTimeOut , LAAW_OPTION_WAIT | LAAW_OPTION_SHOW_HOURGLASS | LAAW_OPTION_WAIT_INCL_CHILD | LAAW_OPTION_USE_SHELLEXECUTE);
//: show the actual installation, maybe not needed but couldnot make installation show its window by own.
GetWindowHandle(handle);
ShowWindow(handle, SW_SHOWNORMAL );
endif;
endif;
endif;
endif;
Dlg_SdWelcome:
..........other stuff
Besides this workaround i still need a better solution.
Thanks
Ugur