Writing to registry in 64 bit OS with NSIS

We all know that NSIS is by far the most powerful and customizable software installer.
Now I've figured out how to install on a 64 bit platform to a registry entry that is not under the wow6432Node.

Include these lines in your .nsh file:
!include "LogicLib.nsh"
!include "x64.nsh"
To check if it's a 64 bit and to switch to the 64 bit mode of the registry use this:
  ${If} ${RunningX64}
     SetRegView 64
WriteRegStr HKLM "" "version" "${VERSION}"
SetRegView 32
  ${EndIf} 

Post a Comment

Previous Post Next Post