' -*- coding: utf-8 -*-

regpath = "HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment"
On Error Resume Next
currentjavaversion = sh.regread(regpath & "\CurrentVersion")
If Err Then
  MsgBox "Java n'est pas installé. Installez d'abord Java et relancez ce script", vbCritical
  wscript.quit(1)
End If
javadir = sh.regread(regpath & "\" & currentjavaversion & "\JavaHome")
javadir = inputbox("Confirmez le chemin vers l'installation de Java (JRE)", "Répertoire de java", javadir)

If javadir = "" Then
  MsgBox "Installation annulée", vbExclamation
  wscript.quit(0)
End If
