You could use the PROCESSOR_ARCHITECTURE variable to see if this is 64 bit or 32 bit OS; AMD64 or IX86.
The comments output by the batch file are a bit misleading...
On a 64 bit Windows, 32 bit Java is in %ProgramFiles(x86)%\Java\ and 64 bit Java in %ProgramFiles%\Java\
I will check a 32 bit machine later.
|