How to identify any product is already installed - Advanced Installer Community

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!

ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

How to identify any product is already installed

Hi,

I created one installer let say Product_1 (in advance installer), which is already installed in the system. Now I am creating installer for product_2. I want if user install Product_2 then it should ask to uninstall Product_1 (if Product_1 is already installed). I did not make any entry in Registry for Product_1.

How my new installer (Product_2) will identify that Product_1 is already installed?

Please suggest.

Thanks
Amit
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to identify any product is already installed

Hi

One solution I found for this. i do not know whether it is correct or not but it is working.

I opened the .aip file of new Installer (Product_2) and changed the "ProductCode" and "UpgradeCode" same as I have in previous installer (Product_1).

Please let me know if I did any thing wrong or if it harms me in long run.

Thanks
Amit
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to identify any product is already installed

Hi Amit,

You can not install two products with the same Product Code on the same machine, or an error saying that the product is already installed will occur.
The How do I uninstall another msi package when my application is uninstalled How-to explains a similar procedure of how to uninstall another version. You can adapt this to run when your product is installed, not uninstalled.

You can use a Search in the registry to search for the Product Code of Product_1, store the result in a property, and use that property in to condition a custom action which displays a propt to the user (as shown in the above how-to) then uninstalls Product_1.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”