I am trying to see if net 4.x or 3.5 is installed for a chm help file using client side javascript.
I am using the values from this SO post:
How do I detect what .NET Framework versions and service packs are installed?
I keep getting the following error but I checked and the key exists:
WshShell.RegRead: Unable to open registry key "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\Install" for reading
Here is my code:
var sh= new ActiveXObject("Wscript.shell")
var t= sh.RegRead("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\Install");
var z= sh.RegRead("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5\\Install");
if(t)
{alert('V4.x is installed');}
else if (z) {alert('V3.5 is installed');}
else { alert('No framework is installed');}
Any ideas?