I have written nsis script for java project.I have Batch file in my project.I have written batch file for commonly windows 32bit and 64 bit.After installing i have started batch file automatically using Exec command.Its woks fine in 32bit windows.but the same time this is not worked well in 64 bit.so i suspect that before installing i should check whether windows is 32 bit or 64 bit version.please share your views how to check?
Description. A simple function to return the version of Windows that the script is running on. It can detect Windows 95 through Windows 8.1, returns the version number if it is Windows NT 3 or 4 and returns a blank string if it can not determine the Windows version.
The 64-bit versions of Windows don't provide support for 16-bit binaries or 32-bit drivers. Programs that depend on 16-bit binaries or 32-bit drivers can't run on the 64-bit versions of Windows unless the program manufacturer provides an update for the program.
For future lazy googlers - A small snippet:
Include this:
!include x64.nsh
And use this if:
${If} ${RunningX64} # 64 bit code ${Else} # 32 bit code ${EndIf}
Use the RunningX64 macro in the x64.nsh header:
!include LogicLib.nsh !include x64.nsh Section ${If} ${RunningX64} DetailPrint "64-bit Windows" ${Else} DetailPrint "32-bit Windows" ${EndIf} SectionEnd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With