hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Run setup only if other SW installed

Tue Oct 27, 2020 11:09 am

I want to abort installation if some other software is not installed. However, the other SW is not available for download, and neither do I want to include it in this setup because that would make the setup file too big. The user should be alerted with a message like "Cannot install <this> because <that> is not installed", and setup should exit.

The other SW comes with an installer that is also created with AI.

Is that possible?

Thank you
Hans

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Run setup only if other SW installed

Tue Oct 27, 2020 12:56 pm

Hi Hans,

Yes, you can achieve this using the "Launch Conditions" support. Please take a look on the "Set launch conditions" tutorial for more details.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: Run setup only if other SW installed

Tue Oct 27, 2020 1:29 pm

Hi Eusebiu,
thank you for replying. What is a suitable condition for "application X is installed"? Should I test whether the main EXE file exists? What if it was installed to a non-default directory?
Thanks
Hans

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Run setup only if other SW installed

Wed Oct 28, 2020 12:25 pm

Hi Hans,

The best way is to create a "Product Version (identify by Upgrade Code)" search to see if the other software is installed on the machine and use that search as a launch condition.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: Run setup only if other SW installed

Mon Nov 02, 2020 8:30 am

Thank you Eusebiu, it works. I may have to add a version check later, but that seems to be easy.

Hans

hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: Run setup only if other SW installed

Mon Nov 02, 2020 8:56 am

Correction. It doesn't work because, even if the software is installed, the launch condition seems not to be fulfilled. I am attaching a screenshot of the search definition, of the launch condition, and of the installer log file. What am I missing?
Asking more generally: What does the app search do with the property variable if the app is/isn't found? Just define/undfine, or set to "1"/"0", or to "true"/"false", or whatever? Or am I doing the wrong search? (I copied the upgrade code from the AI project for the other product.)
Attachments
2020-11-02_08h54_45.png
2020-11-02_08h54_45.png (46.97KiB)Viewed 18747 times
2020-11-02_08h53_17.png
2020-11-02_08h53_17.png (45.8KiB)Viewed 18747 times
2020-11-02_08h51_50.png
2020-11-02_08h51_50.png (81.23KiB)Viewed 18747 times

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Run setup only if other SW installed

Wed Nov 04, 2020 2:13 pm

Hi,

The configuration seems to be correct in your project. When the app is found, the search property is defined, otherwise it remains undefined. You can use that property as a launch condition as described in the "I add a custom condition to check if mysql installed,but why it no using" thread.

If you write any value in the "Minimum" or "Maximum" fields of the search, the related property will be set to the version of the application if it is found.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: Run setup only if other SW installed

Wed Nov 04, 2020 5:47 pm

Hi Eusebiu,
this is from the installation log:

Code: Select all

Action start 18:48:05: AppSearch.
AppSearch: Property: AI_SETUPEXEPATH, Signature: AI_EXE_PATH_LM
MSI (c) (74:58) [18:48:05:285]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (74:58) [18:48:05:285]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Caphyon\Advanced Installer\LZMA\{963F76B3-008C-4DCB-9012-9648CCFDB531}\1.0.11.0 3: 2 
AppSearch: Property: AI_SETUPEXEPATH, Signature: AI_EXE_PATH_CU
MSI (c) (74:58) [18:48:05:285]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (74:58) [18:48:05:285]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Caphyon\Advanced Installer\LZMA\{963F76B3-008C-4DCB-9012-9648CCFDB531}\1.0.11.0 3: 2 
Action ended 18:48:05: AppSearch. Return value 1.
MSI (c) (74:58) [18:48:05:285]: Doing action: LaunchConditions
Action 18:48:05: LaunchConditions. Evaluating launch conditions
Action start 18:48:05: LaunchConditions.
**** Server must be installed in order to install ROAD Interview Recorder.
Obviously the installer performs a search at HKEY_LOCAL_MACHINE\Software\Caphyon\Advanced Installer\LZMA\{963F76B3-008C-4DCB-9012-9648CCFDB531}\1.0.11.0 3. The problem is that even HKEY_LOCAL_MACHINE\Software\Caphyon\Advanced Installer\LZMA does not exist on that machine.

Two more observations:
  • The GUID {963F...B531} is not the GUID which I entered as "upgrade code". The "upgrade code" appears nowhere in the log file.
  • Aside from time stamps, log files are identical between a run when the **** server was not installed, and a run when it was installed.
I'm using AI version 16.9 under "Enterprise" license.

Any ideas? Anything I could try to help you diagnose the issue?

Thank you
Hans

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Run setup only if other SW installed

Thu Nov 05, 2020 1:21 pm

Hi Hans,

Please send me your project and a full verbose log of the installation to support at advancedinstaller dot com, so I can investigate them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: Run setup only if other SW installed

Mon Nov 09, 2020 11:09 am

I did so. Thank you for taking the time.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Run setup only if other SW installed

Thu Nov 12, 2020 10:57 am

Hi Hans,

This behavior is generated by the "Check launch conditions before searching for prerequisites" option from "Prerequisites" page. Could you please uncheck this option and then rebuild and test again you scenario?
screen.jpg
screen.jpg (428.18KiB)Viewed 18576 times
When this option is checked, what actually happens is that the launch condition is evaluated before the search (defined in "Search" page) for your server software is executed. Thus the related property is always empty and the launch conditions fails.

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”