Search code examples
nsis

unable to read the registry key - nsis


i need to read the registry key from the HKLM. Even though the key(ObjectDirectories) is present in the registry, but I was unable to get the data

Here is the following code:

!include x64.nsh
!include LogicLib.nsh

Section

SetRegView 64

        ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager" "ObjectDirectories"

        MessageBox MB_OK "The value of the ObjectDirectories : $0"

 SectionEnd

I've tried with setregview32 & setregview64, still i was getting nothing


Solution

  • After doing the massive research, found this solution. The key I was searching for is "REG_MULTI_SZ" to read this key, we required the set of inbuilt function. & here is the solution link. "https://nsis.sourceforge.io/REG_MULTI_SZ_Reader"