Wix: how to uninstall previously installed application that is installed using different installer
Asked Answered
S

3

1

Suppose that you have an installer (not a wix installer) that you downloaded from somewhere. How can you know UpgradeCode of that installer so that you can fill it in in the UpgradeCode section in the new installer that you prepare?

Can I learn it from registry somehow? So the question is basically, how to know the UpgradeCode of a program that is installed in the computer.

Actually my problem is that my product has been installed with another installer and I am now trying to move it to wix installer. However, I can't find upgrade code in previous installer and I want to find it from installed software.

Thanks.

Selfacting answered 20/6, 2014 at 11:52 Comment(0)
I
2

As I posted to WiX users:

I've seen this done by having the upgrade get the uninstall string from the registry, where there should be a command you can use since it's not MSI-based. Whether you should call it in the UI sequence or the execute sequence or both depends on your requirements for silent installs, meaning that you'd need to do it silently in the execute sequence, and perhaps need to alter the uninstall command to make it silent.

The same general idea should work if that install has a standard uninstall shortcut you could get the command from. Either way, you're just using a CA to run an external program, or maybe a Util CAQuietExec kind of thing.

Indicator answered 20/6, 2014 at 16:39 Comment(0)
D
2

Assuming it's a Windows Installer based installer ( WiX, InstallShield, et al ) you can edit it with ORCA and look at the Property table to see it's UpgradeCode. You may have to first extract it if it was packaged as a self extracting installer.

You can also query the MSI API or look in the registry (HKCR\Installer) for this information. If you go the registry route it's probably easiest to look at the Products/GUID/Sourcelist key and trace it back to a cached MSI and look at it in ORCA. Otherwise you have to learn how to join different datasets and convert Darwin transformed GUIDS back to their original GUID format.

Donte answered 20/6, 2014 at 13:17 Comment(2)
Hi Christopher, Thanks for your reply. I need to consult you some things because I am not quite sure if I understand the concept correctly. 1. When I install the application using the previous installer, I see that a new key comes under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\. The key name is the product ID right? 2. We should keep the upgrade code the same not the product ID, right? 3. What is the disadvantage of keeping the product ID the same in all revision? Apart from all these questions, how can I extract the installer since it is an exe file.Selfacting
Thank you a lot ! The road to Darwin/PackedGUID to GUID is far simplier than expected.Vevay
I
2

As I posted to WiX users:

I've seen this done by having the upgrade get the uninstall string from the registry, where there should be a command you can use since it's not MSI-based. Whether you should call it in the UI sequence or the execute sequence or both depends on your requirements for silent installs, meaning that you'd need to do it silently in the execute sequence, and perhaps need to alter the uninstall command to make it silent.

The same general idea should work if that install has a standard uninstall shortcut you could get the command from. Either way, you're just using a CA to run an external program, or maybe a Util CAQuietExec kind of thing.

Indicator answered 20/6, 2014 at 16:39 Comment(0)
R
2

Fire up PowerShell (run as admin) and run this command to get a list of installed products with product code:

Get-WmiObject Win32_Product | Format-Table Name, LocalPackage

You will get a list of all installed MSI products, and a weird looking path to the local cached MSI database. It normally looks something like this:

C:\Windows\Installer\235bbf8.msi

The 235bbf8.msi file name is random, and will be different for each installed product. It is a cached copy of the MSI file that you originally installed. It does not contain cab files (or at least it didn't in older versions of Windows).

You can open that file with the random name from Orca by chosing File -> Open and then pasting in the full path to the file open dialog, and then pressing open. Don't make any changes but check the upgrade code in the Property table. You can also use other MSI tools such as Installshield.

Note that the path C:\Windows\Installer is "super protected" and is not even visible in Windows Explorer before you enable the show hidden folders AND you disable the protect operating system files option. I still believe you can open the file directly if you paste the whole path into Orca - no need to go via Windows Explorer.

Return answered 21/6, 2014 at 9:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.