![]() |
#201 |
Senior Member
Join Date: Apr 2009
Location: Bulgaria
Posts: 191
|
Hi!
I had the following problem. In my script I delete a registry key (with NSIS commands), then later in my script I check if the key exists, using registry::_KeyExists. Normally the check comes very near after the deletion. The problem is that the result from _KeyExists is 0 that means the key exists, but it doesn't exist anymore (I can see this with Regedit). But if I put "sleep 5000" before the check the results is correct, the plug-in returns -1. What is the explanation about this? [edit #1] I see that the information from me is not good enough. Actually I delete the registry key in separate installer, called in silent mode. I call it with ExecWait command and when it exists, I check if the registry key exists. Only in this situation I have a problem. [edit #2] Some additional information. I call the integrated installer (this one that I call in silent mode) several times. I saw that once (probably, because it opens some cmd-windows for short time) that the script runs after ExecWait, but my integrated installer is still working... This can explain the behavior that I mentioned before, but how I can be sure that the installer, called in silent mode (also compiled with NSIS) is finished? I thought that it is enough to call it with ExecWait... |
![]() |
![]() |
![]() |
#202 |
Senior Member
Join Date: Apr 2009
Location: Bulgaria
Posts: 191
|
I understood what is the reason. The integrated installer/uninstaller is copied to temp-folder and started from there (typical behavior). ExecWait exist after the started of the second executable. If I already know the problem, Google can help me to fin a solution.
|
![]() |
![]() |
![]() |
#203 |
Junior Member
Join Date: Nov 2014
Posts: 2
|
Registry plugin v4.1 triggers AVG virus
Just downloaded the NSIS registry plugin (http://nsis.sourceforge.net/Registry_plug-in). Tried to install it, and AVG alerted it was infected with a virus (Trojan horse Generic_s.CNY).
Anybody else have this? |
![]() |
![]() |
![]() |
#204 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#205 |
Junior Member
Join Date: Mar 2015
Posts: 3
|
CRASH in VERSION 4.1 with NSIS 2.3
Hello, I´m executing a script with Registry.dll (Windows 8) to look for some keys under HKU node, but for some reason, application crashes in a find call (when some nodes have already been found). I have tried to run RegistryTest.exe with the example of "Search for value 'Content Type'", but replacing HKEY_CURRENT_USER with HKEY_USERS and the result is the same: at some point, app crashes.
Anyone has the same problem or can provide some info about this?? Thank you in advance... |
![]() |
![]() |
![]() |
#206 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Are you sure you are using NSIS v2.3? That is very old, try upgrading to 2.46...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#207 |
Junior Member
Join Date: Mar 2015
Posts: 3
|
Plugin crash....
Excuse me, yes, I´m using NSIS 2.46, but if I open "About" window in MakeNsisW.exe it tells me version 2.3...
|
![]() |
![]() |
![]() |
#208 |
Junior Member
Join Date: Mar 2015
Posts: 3
|
Registry plugin crash
Has anyone experienced this problem with registry plugin when trying to search in HKEY_USERS node???
Thanks in advance. |
![]() |
![]() |
![]() |
#209 |
Junior Member
Join Date: Jul 2015
Posts: 2
|
registry::KeyExists returns invalid results
Hello,
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). code: 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. |
![]() |
![]() |
![]() |
#210 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Is this a 64-bit system?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#211 | |
Junior Member
Join Date: Jul 2015
Posts: 2
|
Quote:
If I may make a suggestion to those who maintain the documentation for the registry plugin - you might want to consider adding some explanations regarding the 32/64-bit modes, as some users (as myself) might be unaware of the SetRegView command, or believe (falsely) that it only affects the built-in NSIS commands (EnumRegValue, etc.) Again, thank you for your help. |
|
![]() |
![]() |
![]() |
#212 | |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Yes, last version (4.1 at the moment) fully unicode compatible (ofcourse you should use unicode NSIS).
Quote:
|
|
![]() |
![]() |
![]() |
#213 |
Junior Member
Join Date: Feb 2016
Posts: 5
|
Does it work with NSIS 3?
|
![]() |
![]() |
![]() |
#214 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
The plug-in API has not changed at all for NSIS 3.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#215 |
Junior Member
Join Date: Feb 2016
Posts: 5
|
Ok, thanks.
I get an errormessage while compiling my script with NSIS 3.0rc1, and i have no idea: code: this ist the code within the script: code: |
![]() |
![]() |
![]() |
#216 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
It says it right there ...Plugin not found... Put the plugin in the correct subfolder under NSIS\Plugins\...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#217 |
Junior Member
Join Date: Dec 2016
Posts: 3
|
Registry plugin v4.1 reading past 3rd subkey.
Hello,
This beginner doesn't know what I'm possibly doing wrong, but I cannot get the KeyExists to recognize a key past the third sub key? or read a value past a third key. Can anyone help me? I'm modifying the RegistryTest example from the example to test. ${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products\Pervasive.SQL NT Server" $R0 $RO = -1 ${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Products" $R0 $RO = 0 ${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Pervasive Software\Btrieve Requester\Version 11\Settings" $R0 $RO = -1 I also get no value info past the third subkey reg_sz value. ${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' |
![]() |
![]() |
![]() |
#218 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#219 |
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 |
![]() |
![]() |
![]() |
#220 |
Junior Member
Join Date: Dec 2016
Posts: 3
|
Solved - SetRegView 64 solved my problem with using the Registry Plugin. Thank you Anders for clueing me in to how the plugin was reading. The registry keys I wanted were only found in the x64bit registry and not in the x86bit. Which the Registry Plugin was reading only the 32bit by default. By using the SetRegView 64 the Registry Plugin reads it correctly.
|
![]() |
![]() |
![]() |
#221 |
Junior Member
Join Date: Nov 2017
Posts: 2
|
Hi guys,
I'm very new in NSIS and I'm trying to find a string in the windows registry that identifies my application, but I'm facing problems with win32 and win64. In my pc (Win10 64bits) I have the following registries: Computador\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QUANT MetaTrader 5 Computador\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QUANT MetaTrader 5 TRIAL and Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MetaTrader 5 Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MetaTrader 5 Terminal Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MetaTrader XP Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\QUANT MetaTrader 5 TRIAL I'm using this function to find the regs: * APP_NAME_MT5 = "Metatrader" Function SearchValueReg Var /GLOBAL schHandle Var /GLOBAL schPath Var /GLOBAL schValue Var /GLOBAL schString Var /GLOBAL schType Var /GLOBAL insFullPath Var /GLOBAL insPath SetRegView 32 ${registry::Open} "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" "/K=0 /V=1 /S=0 /B=1 /NI=${APP_NAME_MT5}" $schHandle ${Do} ${registry::Find} "$schHandle" $schPath $schValue $schString $schType ${If} $schType != "" MessageBox MB_OK "$schValue" ${EndIf} ${LoopUntil} $schType == "" ${registry::Close} "$srcHandle" ${registry::Unload} FunctionEnd if I use SetRegView 32, I got 2 registries. But, if I use SetRegView 64, I got nothing. What I'm doing wrong? Thanks in advance. |
![]() |
![]() |
![]() |
#222 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
"/K=0 /V=1 ..." means you are searching for values, not keys. If you want to search for values then make sure all the DisplayName values actually contain your string.
If it still does not work, make sure you are using the latest version of the plug-in and watch it access keys with Process Monitor to see where it actually reads. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#223 |
Junior Member
Join Date: Nov 2017
Posts: 2
|
Thanks @Anders, I changed the search to "/K=1 /V=0" and works very well!
Thanks |
![]() |
![]() |
![]() |
#224 |
Junior Member
Join Date: Feb 2013
Posts: 6
|
I have a question. Using the following code, I am able to find the uninstall GUID key i'm looking for.
code: $schPath finds the path of the key based on the DisplayName string. The search finds \Software\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}. I need to extract {GUID} from the search results. How would I go about doing this? Thanks. |
![]() |
![]() |
![]() |
|
Tags |
plug-in, registry |
Thread Tools | Search this Thread |
Display Modes | |
|
|