poltavets
Posts: 2
Joined: Wed Jul 02, 2025 9:10 pm

How to check for .NET 8 Desktop and ASP.NET Core Runtimes and show dialog with download link before installation

I'm building an MSI installer using Advanced Installer and I need to check before installation starts whether both of the following are present:

.NET 8 Desktop Runtime (x64)

ASP.NET Core Runtime 8 (x64)

Requirements:

The check must occur before any files are copied

If either runtime is missing, the installer should display a custom dialog or message

The message should include a clickable link to the official .NET 8 download page

The check should not rely on registry searches — I prefer using dotnet --list-runtimes or other safe method

Ideally, if:

Only Desktop Runtime is missing → show a message with link to that

Only ASP.NET Core Runtime is missing → show separate message

Both missing → show a combined message

What's the best way to implement this using PowerShell Custom Actions, Launch Conditions, or Prerequisites?
I’d also appreciate sample scripts or a best-practice approach.
Liviu
Posts: 1365
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: How to check for .NET 8 Desktop and ASP.NET Core Runtimes and show dialog with download link before installation

Hello and welcome to our forums,

You can achieve this by using our Prerequisites support.

You can add these prerequisites from our predefined list and move them before main package.
predefined prereq.png
predefined prereq.png (44.97 KiB) Viewed 2140 times

These prerequisites will be installed based on the install conditions defined in the Conditions tab.
prereq dialog.png
prereq dialog.png (106.9 KiB) Viewed 2140 times

Let us know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Liviu
Posts: 1365
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: How to check for .NET 8 Desktop and ASP.NET Core Runtimes and show dialog with download link before installation

You're always welcome!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”