Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

193
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda