when I was looking for an answer to how to find out if a Windows OS was 32bit or 64bit, I stumbled upon this other answer: Use NSIS to install 32bit... and used this code below.
!include x64.nsh
Function .onInit
#Determine the bitness of the OS and enable the correct section
${If} ${RunningX64}
SectionSetFlags ${SEC0000} ${SECTION_OFF}
SectionSetFlags ${SEC0001} ${SF_SELECTED}
${Else}
SectionSetFlags ${SEC0001} ${SECTION_OFF}
SectionSetFlags ${SEC0000} ${SF_SELECTED}
${EndIf}
FunctionEnd
However, I run into this error:
!insertmacro: If
!insertmacro: macro named "_LOGICLIB_TEMP" not found!
Error in macro _RunningX64 on macroline 1
Error in macro If on macroline 5
I'm not sure what that's all about. I figured it might have been something to do with LogicLib.nsh, but I am using the exact same if, else statements else where in the same script and no issues there. So, it leads me to believe that its the x64.nsh library that is stopping me.