http://nsis.sourceforge.net/wiki/New_installer_with_JRE_check_%28includes_fixes_from_%27Simple_installer_with_JRE_check%27_and_missing_jre.ini%29
but get this error...
Function: "myPreInstfiles"
Call "RestoreSections"
SetAutoClose: true
FunctionEnd
Function: "CheckInstalledJRE"
MessageBox: 0: "Checking Installed JRE Version"
Push: 1.6.0
Call "DetectJRE"
MessageBox: 0: "Done checking JRE version"
Exch($0,0)
StrCmp "$0" "0" equal=NoFound, nonequal=
StrCmp "$0" "-1" equal=FoundOld, nonequal=
Goto: JREAlreadyInstalled
MessageBox: 0: "Old JRE found"
Error: unterminated string parsing line at D:\TGDTJINSTALLER\installer.nsi:216
Error in script "D:\TGDTJINSTALLER\installer.nsi" on line 216 -- aborting creation process