Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda