Thread: Registry plugin
View Single Post
Old 11th July 2015, 20:54   #209
Junior Member
Join Date: Jul 2015
Posts: 2
registry::KeyExists returns invalid results


For some reason, the KeyExists function of the registry plugin returns -1 on registry keys that exist.

For example, here are 4 registry keys that I've copied from my registry. Out of those, registry::KeyExists returns 0 for the first two keys, and -1 for the last two keys (wrong, should also be 0).


${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Fontcore" $8
MessageBox MB_OK "$8" # Prints 0
${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX" $8
MessageBox MB_OK "$8" # Prints 0

${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CCleaner" $8
MessageBox MB_OK "$8" # Prints -1
${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Loki" $8
MessageBox MB_OK "$8" # Prints -1

I'm using NSIS v3.0b0, and the latest version of the plugin (v4.1) available.
Also, the installer is a Unicode one.

Any help or suggestions would be greatly appreciated.
mikhail78 is offline   Reply With Quote