Derrin
Posts: 16
Joined: Mon Aug 17, 2015 4:47 pm

Detect other installation

Hi all,
How can I prevent an installation, if a specified Installation is already done?
Thx and regards,
Derrin
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Detect other installation

Hello Derrin,

You could implement this by a custom Launch Condition determined by a file search operation result. If a file contained by a previous install is not found, your installation continues. Otherwise a message is displayed and the installation stops.

To do this you need to take the following steps:
- Go to "Searches" page and create a new file search. This file search result will be stored in a property named RESULT_PROPERTY. Enter the name of a file contained by the installation you want to search for.
- Right click on the search and click "Add Location" - "Folder". In the "Path" field you should enter, for example "[SystemDrive]" and in the "Depth" field "6". In this way the search will occur in the system drive with a depth of 6 sub directories.
- Go to "Launch Conditions", Custom tab. Create a new Custom launch condition with the following condition : NOT RESULT_PROPERTY. In the "Description" field enter the message the user will receive when the setup detects the previous install.

Hope this helps!

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Derrin
Posts: 16
Joined: Mon Aug 17, 2015 4:47 pm

Re: Detect other installation

Thx for the fast response and detailed description.

What is best practice to search in registry to find out if another msi is installed?

for example:
If product A is installed it's not possible to Install product B vice versa.
Both products are developed and deployed by our company with advanced installer setup.

thx. Regards,
Derrin
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Detect other installation

Hello,

You're welcome!

This could be done by creating a Search in a Registry location created by the other application. For example, if the setup of Application A is created with Advanced Installer then, by default, the following key is created HKEY_LOCAL_MACHINE\SOFTWARE\Your Company\Application A\. The setup of the Application B should search a value contained by this key, for example "Path". In a similar way, Application A should search in "HKEY_LOCAL_MACHINE\SOFTWARE\Your Company\Application B\ for "Path" key.

Another method for achieving this is to search for the Upgrade Code of the other install. You can find the Upgrade Code of a setup in "Product Details" page, "Product IDs" tab. You can create a new "Extended search" in "Search" page, with "Product Version (identify by Upgrade Code)".

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”