7

Is there any registry key to determine whether a windows machine has the .NET Core Desktop Runtime installed programmatically (e.x through c#)? I can see the registry is getting the following key when I install the .net core runtime \HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.NETCore.App<version>

This key is not specific to .NET Core Desktop Runtime what I want to know explicitly the .NET Core Desktop Runtime. I am modifying an existing installation setup for a WPF application and there I need to check the availability of .NET Core Desktop Runtime and if not installed then have to go and install. The tool that I am usinig to create the installation setup has the facility to check a particular registry key and also can download and run any exe (may be the .net desktop runtime). Please help

Nlr
  • 183
  • 3
  • 13

2 Answers2

3

try this paths to find versions:

'SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.**WindowsDesktop**.App';

'SOFTWARE\dotnet\Setup\InstalledVersions\x86\sharedfx\Microsoft.**WindowsDesktop**.App';
Subhashis Pandey
  • 1,473
  • 1
  • 13
  • 16
NizMaS
  • 47
  • 3
  • Not in my case; on a system where .NET Core and Windows Desktop Runtimes are both installed, both registry settings are listed under 'Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.NETCore.App'. – Arvindh Mani Jan 24 '22 at 16:19
2

If you go to the control panel, you can see the available .Net Runtime download.

ControlPanel

LinkedListT
  • 681
  • 8
  • 24
  • thanks for tip. Do you have any idea how we can determine the available runtime in a windows system programmatically? I think I have missed one important part in the question that is I need to check this programmatically. I will update the question – Nlr Jun 29 '21 at 02:16
  • @Nlr maybe this is what you're looking for then https://stackoverflow.com/a/49754978/9936356 – LinkedListT Jun 29 '21 at 13:20