Why does this script try to install the jre when it doesn't need to? I verified that C:\Windows\System32\java.exe
does in fact exist, but this script doesn't see it. The script is targeting XP, Vista, 32 bit, and 64 bit. The script !includes x64.nsh
. The reason for the first ElseIf is that the javaw.exe is sometimes installed in C:\Windows\System32\
on 64 bit systems. Is the logic bogus? If so, how? Is the use of C:\Windows\System32\javaw.exe
improper?
${If} ${FileExists} `$SYSDIR\javaw.exe`
; Skip JRE install
${ElseIf} ${FileExists} `C:\Windows\System32\javaw.exe`
; Skip JRE install
${ElseIf} ${RunningX64}
ExecWait '"jre-6u22-windows-x64.exe"'
${Else}
ExecWait '"jre-6u22-windows-i586-s.exe"'
${EndIf}