|
|
#1 |
|
Junior Member
Join Date: Nov 2015
Posts: 1
|
Better Java Detection
The A_slightly_better_Java_Launcher example in the Wiki fails to detect a 32-bit Java run-time on a 64-bit machine, which is common considering the amount of users which historically installed 32-bit Java for Chrome/Firefox.
The codeblock should help discover the 32-bit version (requires x64.nsh). This can go immediately before StrCpy $R0 "javaw.exe" code: However, due to the redirecting of ProgramFiles to ProgramFiles(x86) this still will have problem if the NSIS installer is in 32-bit mode, so some additional 64-bit detection logic is still required. The full source can be viewed here.I haven't converted this example for generic usage yet, but it should be trivial to remove the variables our code is using and replace them with your own. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
It would be nice if you could update the wiki. I don't have Java installed so I cannot really look into the ProgramFiles(x86) issue...
IntOp $PostCount $PostCount + 1 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|