truejegor
Posts: 7
Joined: Thu Sep 16, 2021 9:49 am

Removе by UpgradeCode

Tue Nov 02, 2021 2:27 pm

Hello!
Please help me with my problem. I am doing the assembly in .msi. I need to call the uninstallation of my program by the update code. I found a similar solution in this thread: viewtopic.php?t=12297 . It almost helped me, but there was a problem. When I try to uninstall any program by this code (without formatting and flipping, reverse), then it is uninstalled without problems, but when I try to uninstall the MY program that I built, I get this:
(Translate: Are you sure you want to uninstall this product?)
Screenshot_45.png
Screenshot_45.png (3.82KiB)Viewed 5734 times
And then this:
Screenshot_48.png
Screenshot_48.png (64.19KiB)Viewed 5734 times
Here's an example in cmd:

Code: Select all

msiexec.exe /x {14361018-38E1-4A92-A787-78C1A1464AFD} //producCode - done

Code: Select all

msiexec.exe /x  {B3EAE680-B925-42D7-9E67-4746FA64BCB6} //UpgradeCode 
Are you sure you want to uninstall this product? and this:
(Translate: This action is only allowed for installed products:)
Screenshot_49.png
Screenshot_49.png (5.75KiB)Viewed 5733 times

Code: Select all

msiexec.exe /x  {086EAE3B529B7D24E9767464AF46CB6B4B6} //reverse UpgradeCode - 2 picture

Code: Select all

msiexec.exe /x  {810163411E8329A47A78871C1A64A4DF} //reverse ProductCode - 2 picture
I also tried to uninstall the program using the UpgradeCode, which I specified in the advanced installer, but I get the same error, although when I run the uninstall using the product code, everything goes without problems.
I want to do this without adding new key and new value to the registry via the registry tab in AI.
Thanks in advance for your reply.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Removе by UpgradeCode

Thu Nov 04, 2021 1:45 pm

Hello,

Unfortunately, I'm afraid that it might not be possible to do the uninstallation using the UpgradeCode.

First of all, please note that the UpgradeCode can be the same for multiple setups (e.g. if you install v1.0, v2.0 side-by-side).

The only way to uniquely identify a product is through the ProductCode, therefore I would suggest using it to uninstall your product.

You can have a look over the following article, where it states that msiexec expects the ProductCode to be passed when used with the /x command line.

Command-Line Options

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”