JRE installation
I have inherited a project that uses NSIS to install a JRE depending on the OS bit version. The install fails with a "file not found" error. The section of code that does the install follows:
DetailPrint "About to execute Java Runtime Installer...Please Wait as this will take a few minutes."
SetDetailsPrint LISTONLY
StrCpy $JRE_INSTALLER_FILE_NAME "$TEMP\jre-install.exe"
${IF} ${RunningX64}
File /oname=$JRE_INSTALLER_FILE_NAME resources\binaries\jre-6u29-windows-x64.exe
${else}
File /oname=$JRE_INSTALLER_FILE_NAME resources\binaries\jre-6u29-windows-i586.exe
${endif}
nsExec::ExecToStack '"$JRE_INSTALLER_FILE_NAME" /s /v /qn REBOOT=Supress AgreeToLicense=YES'
Pop $0
Pop $0
DetailPrint "$0"
SetDetailsPrint NONE
Delete "$JRE_INSTALLER_FILE_NAME"
SetDetailsPrint BOTH
When I run this with no installed jre, I get the following output:
About to execute Java Runtime Installer...Please Wait as this will take a few minutes.
Extract: C:\Users\ABC-DE~1\AppData\Local\Temp\jre-install.exe... 100%
Error opening file C:\Users\ABC-DEFGH-IJK\AppData\LocalLow\Sun\Java\jre1.6.0_29\Java3BillDevices.jpg
Error: 2
However, if I copy that same jre install executable into that directory and run it, it runs fine. Any ideas? I’m at a loss