how to check for conditions before Prerequisites are installed - Advanced Installer Community
eranij
Posts: 7
Joined: Fri Apr 12, 2019 6:40 pm

how to check for conditions before Prerequisites are installed

Hi,

I wanted to check for D: drive before Installation of prerequisites begin, and fail if D: drive does not exist.

The verification of D: drive works correctly.

If I have prerequisites set, the installer installs the prerequisites first and then displays the message that the D: drive does not exist.

How do I change this order.

Thanks for your help,
Elizabeth.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: how to check for conditions before Prerequisites are installed

Hello Elizabeth,

In order to achieve this, you can proceed as it follows:

- follow the steps I have give you previously to create the search.

- now, please delete the "ErrorMessage" custom action.

- now please go to "Launch Conditions" page --> "Custom" tab and create a launch condition by pressing the "New..." button.

The LC should look as it follows:

Condition: NOT RESULT_PROPERTY = ""
Description: the message you want to be give to the user.

Click "Ok".

Now please go to "Prerequisites" page and make sure the "Check launch conditions before searching for prerequisites" option is checked.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
eranij
Posts: 7
Joined: Fri Apr 12, 2019 6:40 pm

Re: how to check for conditions before Prerequisites are installed

Hi Catalin,

I have tried everything you said, but still my app continues to run even on systems that does not have D: installed.

I want the Installer to fail on machine that does not have D: drive

Thanks,
Elizabeth.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: how to check for conditions before Prerequisites are installed

Hello Elizabeth,

I have tested this once again and everything works as expected.

Please find attached a sample project which I have created and which I think you may find useful:
Your Application.aip
(20.42 KiB) Downloaded 420 times
In the attached .aip file, you can notice that the search was created to look for the "K" drive, which does not exist and which will make the setup fail. You can try to change that do the "D" drive and then test it on your machines. To do so, simply go to "Search" page, click on the search and then replace the "Name:" field's value ("\DosDevices\K:") to "\DosDevices\D:" (without quotes).

Also, some of the files are missing from the project (e.g. the prerequisite). In order to build the project, all you have to do is to remove the ".NET Core Runtime 2.1.5 x86" prerequisite and add it one more time to the project.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
eranij
Posts: 7
Joined: Fri Apr 12, 2019 6:40 pm

Re: how to check for conditions before Prerequisites are installed

Hi Catalin,

I have done exactly as you have suggested, I am still not able to achieve what I wanted to.

The verification of D: drive is being done only after the prerequisites are installed.

If I force the pre-requisites to be installed in the postinstall section, I can see the message that D: drive is missing.

If you can send me your email address, I can send you my project by email.

Thanks,
Elizabeth.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: how to check for conditions before Prerequisites are installed

Hello Elizabeth,

I am sad to hear that it did not work for you.
If you can send me your email address, I can send you my project by email.
Sure, please forward me your project by e-mail at support at advancedinstaller dot com.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
eranij
Posts: 7
Joined: Fri Apr 12, 2019 6:40 pm

Re: how to check for conditions before Prerequisites are installed

Hi Catalin,

I have sent the copy of my project as you suggested by e-mail to support at advancedinstaller dot com.
Anxiously waiting for your help in this.

Thanks,
Elizabeth.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: how to check for conditions before Prerequisites are installed

Hello Elizabeth,

Thanks for the sent project.

After further investigating this, I was indeed able to replicate this behavior. This is caused by the fact that you are using an older version of Advanced Installer (9.0.1).

As you could have noticed, there are three types of launch conditions, these being as it follows:

- System
- Software (also known as predefined)
- Custom

In the previous version of Advanced Installer (15.0.1 and below), the option from the "Prerequisites" page was called:

Check predefined launch conditions before searching for prerequisites

meaning that only the predefined launch conditions are checked before launching the prerequisite(s). Furthermore, this means that the custom launch condition that we have created is excluded.

However, starting with version 15.0.1 of Advanced Installer, the option is no longer called like above, it is called:

Check launch conditions before searching for prerequisites

which means that the custom launch conditions are now also checked before launching the prerequisites.

With that being said, this is the reason why your launch condition is checked just after your prerequisite is installed.

In order to make this work, you can update Advanced Installer to our latest version (15.8), which can be downloaded from our "Download" page:

https://www.advancedinstaller.com/download.html

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
eranij
Posts: 7
Joined: Fri Apr 12, 2019 6:40 pm

Re: how to check for conditions before Prerequisites are installed

Hi Catalin,

Thanks for your response.

It did do what I wanted, when I upgraded The Advanced Installer to Ver 15.8.

Thanks for your time,
Elizabeth.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: how to check for conditions before Prerequisites are installed

You are always welcome, Elizabeth.

Glad I could help.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”