我没有编译它,但是我会尝试跟随。我基于如何检测Windows上已安装的Sun
JRE选择了注册表项?。
;--------------------------------;Defines !define JavaRegKey 'HKLM "SoftwareJavaSoftJava Runtime Environment" ""';--------------------------------;Installer SectionsSection 'Java Runtime' SecJava SetOutPath '$TEMP' SetOverwrite on File 'c:<yourdir>javasetup.exe' ExecWait '$TEMPjavasetup.exe' $0 DetailPrint '..Java Runtime Setup exit pre = $0' Delete '$TEMPjavasetup.exe'SectionEnd;--------------------------------; FunctionsFunction .onInit ReadRegStr $R0 ${JavaRegKey} StrCmp $R0 "" JavaMissing JavaFound JavaFound: !insertmacro UnselectSection ${SecJava} Goto JavaCheckDone JavaMissing: !insertmacro SelectSection ${SecJava} JavaCheckDone:FunctionEnd


