Finding any version of another product 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!

jbridges
Posts: 38
Joined: Fri Jun 09, 2006 12:36 am

Finding any version of another product installed

In this case, the two products (any version) must not be installed on the same machine. So, in my installer, I thought I could locate the UpgradeCode of the other product to determine if it was installed. However, it does not appear to be anywhere in the registry.

If I find the other product installed, I want to give a message and abort the current installation.

Is this possible?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

You can do this by using a search and a custom launch condition.

In the first package you can create a dummy registry value which will be present in the registry after installation. In the second package you use a search for that value and in the "Prerequisites" page, in the "Additional Launch Conditions" section, you create a new launch condition based on the result of the search.

For example: the first package creates the registry value New value with the "Data" field set to 3. In the second package you have a search for this value and you set the "Condition" field in the "Edit Launch Condition" dialog (which is shown when pressing the "New..." button in the "Additional Launch Conditions" section) to RESULT_PROPERTY <> "3".

This will make the second package install only if the first package has not been installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jbridges
Posts: 38
Joined: Fri Jun 09, 2006 12:36 am

Not quite what I need

This would work fine if I were creating both products now. But the product I want to find has been around quite a while with several versions.

This would help only if I were starting out now to create both products.

Any other suggestions?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This is what you can do:
- in the "Upgrades" page, you create a new "Upgrade" by clicking the "New..." button
- you select the existing MSI which you want to use for conditioning the installation (you can create an upgrade for both your MSI files)
- in the "New Upgrade" dialog, in the "Upgrade Action" tab you go to the "Upgrade Action" section and you select "Detect only, placing results in property"
- in the "Result Property" section you set the name of the property (the default is UPGRADE_1)
- in the "Prerequisites" page, in the "Additional Launch Conditions" you set the following condition:

Code: Select all

Condition                     Description
UPGRADE_1=""                  This installation will not continue.
Let me now if you encounter any problems.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”