Does anyone know the best way to handle uninstalling an .exe based application while installing a newly created .msi based package of the same application? For an example If I have an application called app1 that was installed using an .exe but I have recently created a .msi package of a new version of that application; and now would like my .msi package of the new version of app1 to uninstall the .exe version while laying down the new .msi version.

My problem now is when I install my new .msi package of app1. Its displayed in add/remove twice. Once for the .exe version the was already on the machine and once for the new .msi version I recently pushed to it.

I hope this makes sense to someone out there. I've been trying to find a resolution for this problem for some time now. I'm quite new at this so bare with me.
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Find the uninstallation command (UninstallString) under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<.exe based application>
Add a custom action to execute the uninstallation command, you may have to tweek the command line to have it completely silent.
Answered 08/21/2006 by: AngelD
Red Belt

Please log in to comment
If you just don't want the item to show up twice in ARP(Add/ Remove Programs) - then delete the Uninstall key from the registry... - To find it just do a search of HKLM\Microsoft\Windows\CurrentVersion\Uninstall for the name that shows up in the Add Remove Program console. Once you find that key simply write a script or use the RemoveRegistry table to delete that one key.


If none of the files from the MSI overwrote the orginal exe programfiles then you can run the uninstall AngelID talks about...

FYI -- if the UNINSTALL key is in a GUID format then the exe was just a wrapper for an MSI, in which case you could extract the old MSI and grab the upgradecode from the property table and put that in your new MSI's UPGRADE table

Make sure you also delete the ClassesRoot HIVE key ( HKCR\Installer\Products\<Reversed GUID> ... the GUID here will be reversed in a weird way --- --- so a GUID that starts with 12345678-0123-4567-0987, you search for 87654321-3210-7654 ... after this they switch every 2 so 9078

I hope this helps
Answered 08/21/2006 by: gmorgan618
Blue Belt

Please log in to comment
If the EXE is wrapper for an MSI I would rather use the Upgrade table instead and move the RemoveExistingProducts action between the InstallValidate and InstallInitialize action to make sure everthing was removed before installing the new package.
Answered 08/22/2006 by: AngelD
Red Belt

Please log in to comment
U can do a custom action with a VB-script that uninstall your .exe installation this example uninstalls Yahoo toolbar.
I hope it helps //Kallebaah

On Error Resume Next

Dim WshShell, regValue1, intReturn1, intReturn2, intReturn3, intReturn4

Set WshShell = WScript.CreateObject("WScript.Shell")

regValue1 = WshShell.RegRead("HKLM\SOFTWARE\Sectra\IDS5web\Version\Installed")
If regValue1 <> 10 Then

intReturn1 = WshShell.run (C:\Program\Yahoo!\Common\unyt.exe /s", 0, TRUE)
intReturn2 = WshShell.run ("C:\Program\Yahoo!\Common\unypsr.exe /s", 0, TRUE)

End If
Answered 08/24/2006 by: KalleBaah
Senior Yellow Belt

Please log in to comment