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!

Mireille
Posts: 3
Joined: Sun May 14, 2017 4:57 pm

Run upgrade only if product already installed

Hi,

I want to make an upgrade on a product.
I want to find the correct launch condition that will launch my package only if the product is already installed on the target computer.
I tried «old products», «installed», but it doesn't work.

What is the right way to do this?

Thank!


Mireille
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Run upgrade only if product already installed

Hello Mireille and welcome to our forums!

You should condition the upgrade installation based on a Windows Installer Product Upgrade Code search result. You can find more information regarding Product identification in the following link: Product Identification (ProductCode and UpgradeCode). To achieve this you must follow these steps:

-go to your upgrade installation project, to "Product Details" page, "Product IDs" tab and copy the Upgrade Code.
-go to "Search" page and create a new "Extended Search". Select "Product Version (identify by Upgrade Code)" criteria. In the Upgrade Code paste the code you copied earlier. This search will be named by default "RESULT_PROPERTY" and will store the result in the property with the same name.
-go to "Launch Conditions" page, "Custom" tab and create a new custom launch condition. In the condition field enter the following condition :

Code: Select all

RESULT_PROPERTY
-in the description field enter a message to be displayed if the product is not installed

This method will enable the upgrade if any version of the application is installed. If you want to enable it for a specific version you could search for that version's "Product Code" instead of the "Upgrade Code" which is specific to all versions of a product.

Can you give us more details regarding why you need to prevent the installation for machines that do not have an old version installed?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mireille
Posts: 3
Joined: Sun May 14, 2017 4:57 pm

Re: Run upgrade only if product already installed

Thank you for your fast response!
I want to prevent the installation for machines that do not have an old version installed because I want that the downloaded file (upgrade.exe) runs without licensing prompt and thus without licensing key. The file “update.exe” is a complete program and I want to permit the installation only for customers that already have an old version.
Is there a better to do this?

Thanks!



Mireille
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Run upgrade only if product already installed

Hello,

This is the simplest method for implementing your scenario but is not the optimum from a security point of view. The most secure method involves integrating the license in your application. Please have a look on our article : How to integrate the licensing support in my application?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mireille
Posts: 3
Joined: Sun May 14, 2017 4:57 pm

Re: Run upgrade only if product already installed

It doesn't seem to work!
I made the extended search, the launch condition, but the package doesn't recognize the update and the launch condition message appears.
Can I send you screenshots of my test?

Thank you!


Mireille
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Run upgrade only if product already installed

Hello,

Of course you can send us the screenshots. You could eithert post them here or send us an email to support at advancedinstaller dot com.

Your behaviour implies that somehow the Launch Condition is not true. I attached an archive containing two sample .AIP Projects (initial and update) to this post. Please take a look on the way they are configured.

Hope this helps.

Best regards,
Sorin
Attachments
projects.zip
(5.47 KiB) Downloaded 448 times
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”