burnersk
Posts: 43
Joined: Mon Mar 25, 2019 12:26 pm

Launch Conditions for .NET Core 3.1 Desktop Runtime?

Sat May 30, 2020 12:44 pm

I see Caphyon have added the .NET Core 3.1 Desktop Runtime prerequisites. Thanks for that!

However, since I am creating single MSIs only (not EXE installers), how to I define a Launch Condition for .NET Core 3.1 Desktop Runtime? With Launch Conditions, there is only the general .NET Core 3.1 Runtime condition available, but not the .NET Core 3.1 Desktop Runtime condition.

Using Advanced Installer Professional 17.1.1.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Launch Conditions for .NET Core 3.1 Desktop Runtime?

Tue Jun 02, 2020 1:56 pm

Hello,

Indeed, as you have noticed, we do not have a predefined launch condition for ".NET Core 3.1 Desktop Runtime".

However, in order to achieve what you want, we can make use of the "Install Condition" of the ".NET Core 3.1 Desktop Runtime" prerequisite and use that as a launch condition.

Here is how we can proceed:

- open a new Advanced Installer project

- add the ".NET Core 3.1 Desktop Runtime" as a prerequisite in "Prerequisites" page

- select the prerequisite and go to "Install Conditions" tab. Here, you can see what is the search we perform in order to see if the prerequisite is/is not installed

InstallCondition.png
InstallCondition.png (79.5KiB)Viewed 3117 times

As you can see, the search we perform is a "File version" search. Please copy the "Search string" that is used.

Now please go to your main project.

- navigate to the "Search" page

- here, please right click on the "Target Computer" --> "New Extended Search" --> "File version"

- the search may look something as it follows:

SearchNET.png
SearchNET.png (31.5KiB)Viewed 3117 times

As you can see, we basically copied the search string from the prerequisite's install condition.

- if the search is successful, it will return value "1" ==> the property will have the value "1"

- now please go to "Launch Conditions" page --> "Custom" tab --> create a new launch condition as it follows:

LC.png
LC.png (13.51KiB)Viewed 3117 times

If:

Code: Select all

RESULT_PROPERTY = "1"
the installation will continue, otherwise the message will be spawned to the user.

Please note that this was for the x64 version. We might need to create another search and another launch condition for the x86 version.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”