I have an installer that installs correctly to 32-Bit machines. I need to be able to install our application onto 64-Bit machines. I have searched the forums regarding this and have found out the following:
NSIS is a 32-bit installer.
NSIS developers would like to make a 64-bit installer but have no time. Below are issues related to 32-Bit installers and 64-Bit machines.
• 32-Bit installers will run on a 64-bit machines (e.g. x86-64)
• On a 64-bit machine NSIS will run as a 32-Bit process.
• 32-Bit processes can only load 32-Bit DLLs, they cannot load 64-Bit DLLs.
• 64-Bit procesess can only load 64-Bit DLLs, they cannot load 32-Bit DLLs.
• It’s impossible to call 64-Bit plugins from a 32-Bit installer.
• It’s impossible to call 32-Bit plugins from a 64-Bit installer.
NSIS notes
• To determine the version of the OS and architecture have a look in the following directories:
1. NSIS\Include\WinVer.nsh
2. NSIS\Include\x64.nsh
Example using x64.nsh
There is also a plugin which can be found here:
${If} ${RunningX64}
MessageBox MB_OK "running on x64"
${EndIf}
http://nsis.sourceforge.net/GetVersion_(Windows)_plug-in
• On Windows 64-bit you have two copies of HKLM\Software. One for 32-bit applications and one for 64-bit applications. You can access both from NSIS using SetRegView.
• 64-Bit
• 32_Bit
InstallDir "$PROGRAMFILES64\${APPNAME}"
SetRegView 64
Is there anything that I am missing? Are there any pitfalls that I should look out for.
InstallDir "$PROGRAMFILES\${APPNAME}"
SetRegView 32
What is good practice from the following:
(1) Have 1 script that does the lot (32-Bit & 64Bit)
(2) Have 2 scripts one for each.
Any further ideas would be appreciated.
Thanks guys.
Regards
Paul