Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Need help with app Uninstall

InstallShield 2015 Pro

We have a simple EXE app installed on Windows XP (may be), Vista, 7, 8 and 10. Basic MSI Installer just creates a folder, drops the exe, adds an entry in the add/remove programs and in the HLM uninstall key. The installer for this app went through so many hands that there are a lot of package codes, product codes and upgrade codes and version numbers out in the field. Getting them all is impossible. The one thing that hasn't changed is the DisplayName value in the registry.

After years later, we are making a small change to the app and want the installer uninstall the existing app and install the new one. We worked with the settings in the Upgrade view but no avail. There are always some systems giving us the previous version is installed, version installed is newer than version being installed, same version is already installed errors.

We just don't care what version is currently on the system. We want the installer to get rid of the existing version silently as soon as the user clicks on it and move on with installing the new app. Since the DisplayName in the registry is same across different installations, I wrote an InstallScript function to get the UninstallString based on the name and store the GUID in a property. I want this script to run as soon as the user clicks on the installer (before any dialog). Then immediately followed by a custom action that runs the MSIEXEC with the command line parameter /x {GUID} /qn. I don't know if I can combine them both but I just don't want to deal with the Upgrade node.

Thanks for your suggestions.
Labels (1)
0 Kudos
(1) Reply
Level 8

vbscript custom action with something like this will work
Set View = Database.OpenView ("SELECT * From `Upgrade`")
Set oRecord = Installer.CreateRecord(7)
oRecord.StringData(1) =
oRecord.StringData(2) = ""
oRecord.StringData(3) = "999.999.9999"
oRecord.StringData(4) = ""
oRecord.IntegerData(5) = 1024
oRecord.StringData(6) = "
oRecord.StringData(7) = "REMOVE.OLD"
View.Modify 7,oRecord

I used this to remove all java versions some years ago
0 Kudos