I am trying to get the following code from
; The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_NAME}
to
!include x64.nsh ${If} ${RunningX64} ; The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_NAME} ${Else} ; The default installation directory InstallDir $PROGRAMFILES64\${PRODUCT_NAME} ${EndIf}
I get the following error: -
!insertmacro: _If Error: Can't add entry, no section or function is open! Error in macro _RunningX64 on macroline 2 Error in macro _If on macroline 9 Error in script "C:\Users\yccheok\Desktop\mysoftware.nsi" on line 17 -- aborting creation process
Is there a way to set the value for InstallDir inside an if else block?
source share