aho
Posts: 58
Joined: Thu Jul 21, 2016 4:38 pm

Installing .NET Framework Developer Pack - How to check if it is already installed?

Thu Sep 26, 2019 3:34 pm

Hi,
my installer needs to install the ".NET Framework 4.7.2 Developer Pack".
Unfortunately there is no predefined prerequiste for the Developer Pack.

If I choose the 'normal' ".NET Framework 4.7.2" from the predefinded prerequisites, there is a condition which searches the registry for this key: HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release

:?: How can I check if ".NET Framework 4.7.2 Developer Pack" or newer is already installed?

Bests regards,
Andreas

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

Re: Installing .NET Framework Developer Pack - How to check if it is already installed?

Thu Sep 26, 2019 4:00 pm

Hello Andreas,

For instance, you can check one of the following registry entries in order to check if it was installed:

1. HKLM:\SOFTWARE\Microsoft\CurrentVersion\Uninstall\*

2. HKLM:\SOFTWARE\WOW6432Node\Microsoft\CurrentVersion\Uninstall\*

Here is a small PowerShell script which queries those entries:
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where {$_.DisplayName -like '*.NET*' -and $_.DisplayVersion -like '4.7*'} | Select-Object DisplayName, DisplayVersion
(must be run from an elevated PowerShell shell)

Hope this helps.

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

Return to “Building Installers”