/build/static/layout/Breadcrumb_cap_w.png

Uninstalling an application from within a package

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   [ + ] Show comments

Answers (4)

Posted by: AngelD 17 years ago
Red Belt
0
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.
Posted by: gmorgan618 17 years ago
Blue Belt
0
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.

OR

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
Posted by: AngelD 17 years ago
Red Belt
0
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.
Posted by: KalleBaah 17 years ago
Senior Yellow Belt
0
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

Example.
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ