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.
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)
Please log in to answer
Posted by:
AngelD
17 years ago
Posted by:
gmorgan618
17 years ago
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
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
Posted by:
KalleBaah
17 years ago
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
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.
so that the conversation will remain readable.