View Single Post
Old 24th January 2019, 17:07   #2
Nutzzz
Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 58
There is a 64-bit fork of NSIS, but it has some issues and AFAIK it hasn't been updated in quite some time.

However, there's really no need for NSIS to be a native 64-bit app unless you're targeting Windows Server Nano. If you !include LogicLib.nsh and x64.nsh, you can do something like this:
code:
${IfNot} ${RunningX64}
Abort
${EndIf}
${DisableX64FSRedirection}
SetRegView 64


${RunningX64} returns true for either a 64-bit NSIS or a 32-bit NSIS running on a 64-bit OS.
${DisableX64FSRedirection} means when you refer to $SYSDIR or $PROGRAMFILES, it's the 64-bit ones (e.g., C:\Windows\System32 instead of C:\Windows\SysWOW64, which confusingly is the 32-bit one).
SetRegView does the same thing for the 64-bit registry location (i.e., don't allow Windows to automatically redirect into the equivalent location under WOW6432Node).
Nutzzz is offline   Reply With Quote