Archive: How can an NSIS installer script discover if the windows OS is 32 or 64 bits?


How can an NSIS installer script discover if the windows OS is 32 or 64 bits?
I need to be able to provide either the 32 or 64 bit version of jspWin.dll with some .jar files based on the windows OS.
The windows batch method is:

Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0 
REG.exe Query %RegQry% > checkOS.txt
Find /i "x86" < CheckOS.txt > StringCheck.txt
If %ERRORLEVEL% == 0 (
Echo "This is 32 Bit Operating system"
) ELSE (
Echo "This is 64 Bit Operating System"
)

according to http://support.microsoft.com/kb/556009

!include "x64.nsh"


...and a simple forum search would have told you that, too.


!include "x64.nsh"

use the ${If} ${RunningX64} to check for x86 or x64.