I would like to install .NET 6.0 Desktop Runtime 6.0.8, that is windowsdesktop-runtime-6.0.8-win-x64.exe*, as a prerequisite through a setup.exe developed from Installshield 2020 since our app requires .NET 6.0 Desktop 6.0.8 and I try to find the installation conditions for .NET 6.0 desktop 6.0.8. In other words, how to detect whether .NET 6.0 desktop runtime 6.0.8 is already installed or not?
Initially I was looking at the entry Version from the registry key HKEY_LOCAL_MACHINE\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost. Unfortunately I noticed the key is not necessarily updated by .NET 6.0 Desktop 6.0.8 installer.
After doing a bit of internet search, I come across https://learn.microsoft.com/en-us/answers/questions/913327/correct-approach-to-check-for-net-6-installation.html which seems to indicate the registry HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop, entry name <version>, in my case the registry entry “6.0.8” is probably better as it represents whether version 6.0.8 of .NET 6.0 Desktop is installed or not. From experiments, it seems to me the sharedhost ‘s Version represents the .NET 6.0 runtime version and not the version of the desktop part or whether it is installed or not (before installing 6.0.8, the value of sharedhost ‘s Version was 6.0.6, become 6.0.8 after 6.0.8 is installed and if I uninstall manually Desktop Runtime 6.0.8, the value does not change from 6.0.8, however, HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App’s key 6.0.8 is removed after .NET 6.0 Desktop 6.0.8 is uninstalled.
Would you agree to say that the entry 6.0.8 in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App indicates that .NET 6.0 Desktop 6.0.8 is installed and that the entry I should check before trying to install or not .NET 6.0 Desktop 6.0.8?
By the way, I am assuming that other versions of .NET 6.0 desktop can live along 6.0.8 and be installed in any specific order. Maybe I am wrong...