We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Uninstalling product1 from product2

Hi,

I have created setups for the following products
- product1
- product2
- product3

Now, I have created one more product(in which I have merged functionalists of above products) say product4

As part of the product4 installation, I want to uninstall all other products(i.e product1, product2, product3).

When I checked the document, it says we could use "msiexec.exe /x GUID /qb", where GUID is the Product Code of the package you want to uninstall.

But problem with this approach is, for every version "Product code" is changed(i.e product1 v2.2 is different than product1 v2.3) where as "Upgrade code" remains same.

Can I use the "upgrade code" and uninstall the products(irrespective of their version number)??

Regards,
Rohan
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling product1 from product2

Hi Rohan,

To achieve this you can follow the approach (recommended) described in the How to uninstall an existing application thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Uninstalling product1 from product2

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling product1 from product2

You're welcome. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Uninstalling product1 from product2

Hi Eusebiu,

For some reason, we could not get this working.

Reproduction steps
- Install per-user product
- Install per-machine product(in which we have added entries in the upgrade section)
- After installing per-machine, we could see both products in the add/remove programs

Can you please help us with this?

Regards,
Rohan
Attachments
projects.zip
(5.18 KiB) Downloaded 852 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling product1 from product2

Hi Rohan,

I'm afraid that this happens because a package that has an installation type (per-machine or per-user) cannot find and delete a package that has another installation type.

To achieve what you want, you may try to create your own custom actions that searches the versions of the other applications by their Upgrade Codes and removes them.

The Upgrade Codes are stored in the registry at the following path:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\{GUID}
Where {GUID} is the Upgrade Code of the product encrypted as it is described in the Packed GUID’s article.

That {GUID} key contains all the Product Codes related to it, also encrypted as described in the article mentioned above.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Uninstalling product1 from product2

Thanks for the pointers.

I guess, there might be some sources on the net, to do this [e.g. bool GetProductCode(/*IN/GUID UpgradeCode, /*OUT*/ GUID & ProductCode) ]

I will search the same :-)
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstalling product1 from product2

You're welcome.

Indeed, you can find more details on the net and maybe already existent custom actions that can help you.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”