X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FInstdrv%2FNSIS%2FIncludes%2Fjava.nsh;h=c7ec9ca9d08d70b2b129753efb6b6a3688048207;hb=521dc6dbf9aa5f7aad7829cd98a815031725ac24;hp=a457562b334df59214783119a4816035dfda0309;hpb=25cdbf15e7284eb963070b28dd886aa299af6487;p=fw%2Faltos diff --git a/altosui/Instdrv/NSIS/Includes/java.nsh b/altosui/Instdrv/NSIS/Includes/java.nsh index a457562b..c7ec9ca9 100644 --- a/altosui/Instdrv/NSIS/Includes/java.nsh +++ b/altosui/Instdrv/NSIS/Includes/java.nsh @@ -56,14 +56,29 @@ Function openLinkNewWindow Exch Push $0 Exch - - ReadRegStr $0 HKCR "http\shell\open\command" "" + + ReadRegStr $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice" "Progid" + IfErrors iexplore + + Goto foundbrowser +iexplore: + StrCpy $1 "IE.AssocFile.HTM" + +foundbrowser: + + StrCpy $2 "\shell\open\command" + + StrCpy $3 $1$2 + + ReadRegStr $0 HKCR $3 "" + # Get browser path - DetailPrint $0 + DetailPrint $0 + StrCpy $2 '"' StrCpy $1 $0 1 StrCmp $1 $2 +2 # if path is not enclosed in " look for space as final char - StrCpy $2 ' ' + StrCpy $2 ' ' StrCpy $3 1 loop: StrCpy $1 $0 1 $3 @@ -135,7 +150,7 @@ var quit var skip Function GetJRE - ${OpenURL} "java.com" + ${OpenURL} "adoptopenjdk.net" MessageBox MB_OK "Click OK to continue after completing the Java Install." FunctionEnd