Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
checking existence of a registry key using client side javascript

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?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Eliminate the double backslash, use single only. This will work (at least on server-side), unsure about client-side; that's typically restricted in modern browsers.

    Set objShell = CreateObject("Wscript.Shell")
    NF4 = objShell.RegRead("HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\Install")
    NF3 = objShell.RegRead("HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Install")
    Set objShell = Nothing
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!