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!

Regust
Posts: 4
Joined: Sat Mar 01, 2014 7:45 pm

Force reboot only when upgrading from certain versions

Hello,

I need the installer to tell the user that a REBOOT is required ONLY if I am upgrading from certain older versions.

Meaning: I am installing version 3.2.102; I should set the REBOOT property to Force only if the user is upgrading from any version 1.x or 2.x, but not if he's upgrading from 3.0 or 3.1.

I have created a custom action, set the REBOOT property to Force, and set the custom action as shows in the picture (attached).
But obviously now it forces me to reboot also when I upgrade from v3.0 or v3.1 (which I don't want to happen).

Is there a condition I can write to tell the installer to force reboot ONLY if I'm upgrading from any v1 or v2?

Thank you very much in advance for your help!
Attachments
customact.png
customact.png (44.77 KiB) Viewed 2365 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Force reboot only when upgrading from certain versions

Hello and welcome to Advanced Installer forums,

In order to retrieve the ProductVersion of an already installed package you can use an New Extend Search – > Product Version (identify by Upgrade Code) from the Search page.

Then add in the Upgrade Code field the Upgrade Code of your installation package which can be found in the Product Ids tab from the Product Details page.
Also, add 1 statement in the Minimum Required Versions in the extended search properties.

The public property which has been assigned to the search name (by default it is named RESULT_PROPERTY) will contain the version of your application which is installed on the target machine if it is installed, otherwise this property will not be set, will be empty.

I've attached a zip archive that contains a sample which implements your scenario. Build and run it. After you install it, increase the product version (e.g. 2.3.3) in the Product Details page. Rebuild and run it.

Please let me know if there is anything else I can help with.

Best regards,
Dan
Attachments
RebootSample.zip
(2.98 KiB) Downloaded 268 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”