I have an InstallShield 12 installscript. I want to uninstall the old version before installing the new version. I will keep the name of the package unchanged. How can I do this?
With an MSI-based project, this would be accomplished by configuring a Major Upgrade for your project. Upgrades don't exist for InstallScript projects, but there are no Windows Installer restrictions to keep you from running multiple installations simultaneously. You should be able to simply run the uninstallation of the previous version manually in your InstallScript code (maybe in the OnFirstUIBefore function).
Assuming this is not an MSI project and youve kept the same Project GUID, you could simply call ComponentUninstall()
in the OnMaintUIBefore
function.
If the Project GUID is not the same you can look at the uninstall string in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PROJECT_GUID}
and then do a LaunchApp with that.
Hope it helps.