Thread: Registry plugin
View Single Post
Old 4th January 2017, 20:52   #219
ConnivingCritic
Junior Member
 
Join Date: Dec 2016
Posts: 3
Registry plugin not reading

I agree this is very strange and makes no sense. The plugin will not read for me the Pervasive.SQL NT Server. I have tested the below code with the below registry on a 64bit win8 and win10. I double checked that I have the plugin registry.dll and Include Registry.nsh. Here is the registry I'm trying to read: and below its the code I'm using. I have no idea what I am doing wrong. I really would like the ability to read the registry keys below. Can you help me?
Thank you!
------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\OneTwoThree]
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\OneTwoThree\InstallInfo]
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL Client]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL Client\InstallInfo]
"ProductVersion"="12.00.160"
@=""
"InstallData"="C:\\ProgramData\\Actian\\PSQL\\"
"InstallDir64"="C:\\Program Files\\Actian\\PSQL\\"
"InstallDir"="C:\\Program Files (x86)\\Actian\\PSQL\\"
"VersionLevel"="12.00"
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL NT Server]
[HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL NT Server\InstallInfo]
"ProductVersion"="12.11.011"
@=""
"InstallData"="C:\\ProgramData\\Actian\\PSQL\\"
"InstallDir64"="C:\\Program Files\\Actian\\PSQL\\"
"InstallDir"="C:\\Program Files (x86)\\Actian\\PSQL\\"
"VersionLevel"="12.11"
-------------------------------------
;NSIS code
!define PRODUCT_NAME "Configure PSQL 12.11"
!define PRODUCT_VERSION "PSQL 12.11 "
!include "LogicLib.nsh"
!include "Registry.nsh"
Page instfiles
;---------------------------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Configure PSQL 12.11.exe"
InstallDir "$DESKTOP"
ShowInstDetails nevershow
Section "MainSection" SEC01
;--------------
${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\OneTwoThree\InstallInfo" $R0
MessageBox MB_OK "registry::KeyExists$\n$\n\
Errorlevel: [$R0] OneTwoThree exists"
${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL Client\InstallInfo" $R0
MessageBox MB_OK "registry::KeyExists$\n$\n\
Errorlevel: [$R0] Client exists"
${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL NT Server\InstallInfo" $R0
MessageBox MB_OK "registry::KeyExists$\n$\n\
Errorlevel: [$R0] Server exists"
${registry::Read} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL Client\InstallInfo" "ProductVersion" $R0 $R1
MessageBox MB_OK 'registry::Read$\n$\n\
$$R0 "string" =[$R0]$\n\
$$R1 "type" =[$R1]$\n'
${registry::Read} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL NT Server\InstallInfo" "ProductVersion" $R0 $R1
MessageBox MB_OK 'registry::Read$\n$\n\
$$R0 "string" =[$R0]$\n\
$$R1 "type" =[$R1]$\n'

SectionEnd
Attached Files
File Type: nsi Configure PSQL 12v2.nsi (1.5 KB, 55 views)
File Type: txt registrykey.txt (2.1 KB, 87 views)
ConnivingCritic is offline   Reply With Quote