![]() |
#1 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Registry plugin
Features:
- Powerful registry search: -fast algorithm -principle of turn in stack (first in -> last out) i.e. search from first registry key to last -search for key, value and/or string in any root -search with name and/or type -search with banner support -search with subkeys or not - Read value of any type - Write value of any type - Create key - Delete key (same as DeleteRegKey) - Delete value (same as DeleteRegValue) Some performance info: Search in all HKEY_LOCAL_MACHINE where 60351 keys, 84714 values, 84714 strings Search only NOT existed value: (/K=0 /V=1 /S=0 /N=`#Not Existed#`) With /B=0: 0 min 9 sec 580 ms With /B=1: 0 min 16 sec 300 ms With /B=2: 1 min 19 sec 486 ms Search any keys, values, strings: (/K=1 /V=1 /S=1 /N=``) With /B=0: 2 min 46 sec 664 ms With /B=1: 2 min 56 sec 974 ms With /B=2: 6 min 2 sec 668 ms |
![]() |
![]() |
![]() |
#2 |
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
Hey Instructor, nice work.
I had started experimenting doing something similiar with the system plugin. But yours looks much better! Any chance you'll be adding support to import/export REG files? |
![]() |
![]() |
![]() |
#3 | ||
Major Dude
Join Date: Jul 2004
Posts: 671
|
Hi, Comperio.
Import/export simply doing with API RegSaveKey, RegRestoreKey and RegReplaceKey, BUT: Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#4 |
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
hmmm. I see your point. But, if you can do it, I think importing/exporting REG files would be a very cool feature.
And something you might consider: Most of the time, (at least for me anyway), reg files would be used as a means to backup and restore on the same system. So I don't think it's too important that a reg file created on a 9x computer is compatible with a XP computer. (Personally, if I were going to import reg files as part of an install, then I'd probably have 2 files--one for XP and one for 2K). But that's just me... Someone else may have a different view... |
![]() |
![]() |
![]() |
#5 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
|
![]() |
![]() |
![]() |
#6 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changes:
-Merged with REGEDIT4 plugin, probably this will be more comfortable for user. Increase plugin size to 13Kb, but you can simply recompile it, only with functions you need (see defines at the beginning of registry.c). -Fixed: registry::DeleteKey in NT systems didn't delete subkeys -Fixed: problem with compiling "RegistryTest.nsi" when nxs plugin isn't exist -Now registry::RestoreKey checks if file exist "Registry" plugin v1.1 |
![]() |
![]() |
![]() |
#7 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changes:
-Fixed: Double calling GlobalFree in some case, that can cause crash (registry::Find, registry::Close) -Fixed: REG_RESOURCE_LIST, REG_NONE readed as string, instead of binary (registry::Find, registry::Read) -Added: Converts string to hex values (registry::StrToHex) -Added: Converts hex values to string (registry::HexToStr) -Full registry value types support, added: REG_FULL_RESOURCE_DESCRIPTOR REG_RESOURCE_REQUIREMENTS_LIST REG_QWORD BTW: While testing plugin in Microsoft XP I was found errors in REGEDIT with /a switch: -National characters incorrect exports from registry in hex format (first hex digit: c->1 d->2 e->3 f->4) -Special escape sequence "\n" is not replaced with "\\n" "Registry" plugin v1.2 |
![]() |
![]() |
![]() |
#8 |
Major Dude
Join Date: May 2003
Posts: 681
|
Short question cause urgent
can i find all entries "defaulticon" with it ? And can i export them ? ### well that works, but i have empty entries code: it has to be code: not all are empty code: PHP Code:
Greets, Brummelchen Last edited by Brummelchen; 18th August 2005 at 14:50. |
![]() |
![]() |
![]() |
#9 |
Major Dude
Join Date: May 2003
Posts: 681
|
Ok, i did it this way..
PHP Code:
Greets, Brummelchen |
![]() |
![]() |
![]() |
#10 | ||
Major Dude
Join Date: Jul 2004
Posts: 671
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#11 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changes:
-Fixed: Cross-calling functions. Now posible for example: registry::Open /NOUNLOAD ... registry::Find /NOUNLOAD ... registry::Read /NOUNLOAD ... registry::Write /NOUNLOAD ... registry::Close -Fixed: registry::Read, when reading not existed value, returns "INVALID" registry type instead of "" (all output variables must be empty) -Fixed: REG_LINK readed as string instead of binary -Now posible to find default values (any type) or/and empty strings (REG_SZ, REG_EXPAND_SZ). Options with /N="" searches for empty names and without /N= for all names "Registry" plugin v1.3 |
![]() |
![]() |
![]() |
#12 | |
Major Dude
Join Date: May 2003
Posts: 681
|
well - see - "defaulticon" can be in the path
[...\DefaultIcon] and as an entry. "DefaultIcon"= And the example below has it both in the path... but only one of it is read out yes, was 1.2 and 1.3 shows same behaviour. Quote:
Greets, Brummelchen |
|
![]() |
![]() |
![]() |
#13 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Try "Search and write founded in text file" example in RegistryTest.nsi with your registry::Open parameters and check output file.
[edit] I have tested it with options you wrote before ["HKEY_LOCAL_MACHINE" "/K=1 /V=1 /S=1 /B=1 /N='DefaultIcon'"] and all fine. [/edit] [edit2] Tested on XP and all fine. Founded ".JS" key, "DefaultIcon" is value - check your script: [/edit2]code: Last edited by Instructor; 20th August 2005 at 00:12. |
![]() |
![]() |
![]() |
#14 |
Major Dude
Join Date: May 2003
Posts: 681
|
its not "JS"-problem, its here
code: has to be code: on some reason it is empty - try the first script above and test it pls (not the second) Greets, Brummelchen |
![]() |
![]() |
![]() |
#15 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Why you didn't test "Search and write founded in text file"? With it no problem there is something in your script. Like I said before if you find registry key then string is EMPTY, registry::Find can't find registry key and they default string at the same time. You need to read it.
Try this: code: Last edited by Instructor; 21st August 2005 at 08:05. |
![]() |
![]() |
![]() |
#16 |
Major Dude
Join Date: May 2003
Posts: 681
|
You dit not realize that your find-routine sometimes
returnes a value and sometimes not on same condition... i search all /K=1 - Search Keys (default) /V=1 - Search Values (default) /S=1 - Search Strings (default) so if it returnes all values 3 cant be emtpy .r1 - $1="path" .r2 - $2="value" or "key" .r3 - $3="string" .r4 - $4="TYPE" but the string is empty, however please work on that Greets, Brummelchen |
![]() |
![]() |
![]() |
#17 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Brummelchen attach "DefaultIcon.reg" with my previos post or generated file "Search and write founded in text file". Now I don't realy understand what you want
![]() PS I'll say again: if $4="REG_KEY" then $3="" this is by design! |
![]() |
![]() |
![]() |
#18 | |
Major Dude
Join Date: May 2003
Posts: 681
|
Quote:
.. to get the key and not its value although it can be performed. ### ok, let's see... [path] ist without my search string ??? [value] or [key] is somehow what ? eg HKLM [path\key} [string]= ??? dont make either any sense to me... :/ Greets, Brummelchen |
|
![]() |
![]() |
![]() |
#19 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Honestly, I'm not like to talk with people which listen only itself. Of course its not about you, Brummelchen.
|
![]() |
![]() |
![]() |
#20 |
Major Dude
Join Date: May 2003
Posts: 681
|
its not personal but you dont get this point
script + result and as you can see your function mostly returns nothing and in some cases its value. [path] [key]=[value] thats the combination... maybe your point of view is from the applikation - mine is from the registry. PHP Code:
code: Greets, Brummelchen |
![]() |
![]() |
![]() |
#21 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Registry keys always have default values and you ask why when plugin found key it not return default value. I answer
API RegEnumKeyEx isn't return default value, so it must be readed MANUALY. Its not readed by plugin, because it'll reduce plugin perfomance. If our purpose save all default values of keys "DefaultIcon" in file in REGEDIT4 format then options is "/K=1 /V=0 /S=0" not "/K=1 /V=1 /S=1", because first we search for key "DefaultIcon", when we have found it we read default value in this key and then save key and string in file. For example: Our script found key ($0="SOFTWARE\Classes\.nsc", $1="DefaultIcon", $2="", $3="REG_KEY") then we read default value of this key ($4="$0\$1", $5="", $6="dxmasf.dll,-502", $7="REG_SZ") Please test the script below and you'll see that all working ok. Script used headercode: Last edited by Instructor; 23rd August 2005 at 11:00. |
![]() |
![]() |
![]() |
#22 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changes:
-Fixed: registry::Find and registry::Read does not swap 2 bytes in REG_DWORD_BIG_ENDIAN number -Fixed: registry::SaveKey saves REG_DWORD_BIG_ENDIAN not as binary -Added missing types to write: REG_DWORD_BIG_ENDIAN REG_NONE REG_LINK REG_RESOURCE_LIST REG_FULL_RESOURCE_DESCRIPTOR REG_RESOURCE_REQUIREMENTS_LIST REG_QWORD -Source updated to use new StackFunc.h (v1.4) "Registry" plugin v1.4 |
![]() |
![]() |
![]() |
#23 |
Major Dude
Join Date: May 2003
Posts: 681
|
Im a bit confused, pls tell me
code: With IfErrors end the reg-file is about 2k, w/o 55k. so what error happend ? thx Greets, Brummelchen |
![]() |
![]() |
![]() |
#24 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Registry plugin doesn't change IfErrors flag, I see what it changed by ReadRegStr, when it try to read unexisted value. You can use ClearErrors after it.
|
![]() |
![]() |
![]() |
#25 |
Major Dude
Join Date: May 2003
Posts: 681
|
sure, i see - the following ReadRegStr causes that and it is not cleared.
thx, never thought this way. Greets, Brummelchen |
![]() |
![]() |
![]() |
#26 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changes:
-GlobalAlloc replaced with static variables -registry::Write create key if necessary. -Fixed: When reading long binary data odd number appeared (1023 + NULL character). Now string length: 1022 + NULL character. -New: registry::ReadExtra, registry::WriteExtra now possible to read and/or write registry string up to 64Kb (65536) (thanks for idea Iceman_K, RegBin plugin) "Registry" plugin v1.5 |
![]() |
![]() |
![]() |
#27 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changes:
-registry::CreateKey reduce number of parameters (registry::CreateKey "[fullpath]" .r0) -Fixed: registry::Write accepted only uppercase registry type "Registry" plugin v1.6 |
![]() |
![]() |
![]() |
#28 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
New: registry::CopyValue
New: registry::MoveValue New: registry::CopyKey New: registry::MoveKey New: registry::KeyExists "Registry" plugin v1.7 |
![]() |
![]() |
![]() |
#29 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Fixed: mixed MAX_STRLEN and MAX_PATH defines, maximum registry string length was 256+32 (appeared in v1.7)
Updated: StrFunc.h to v1.4 "Registry" plugin v1.8 |
![]() |
![]() |
![]() |
#30 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
New: registry::DeleteKeyEmpty delete empty key (if no values and subkeys in it)
"Registry" plugin v1.9 |
![]() |
![]() |
![]() |
#31 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
If anyone can test this version of the registry plugin for Pocket PC?
|
![]() |
![]() |
![]() |
#32 |
Junior Member
Join Date: Aug 2005
Location: Spain
Posts: 15
|
Can you please add support for version 5 of Windows Registry?
|
![]() |
![]() |
![]() |
#33 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
For what you need Windows Registry 5?
|
![]() |
![]() |
![]() |
#34 |
Junior Member
Join Date: Aug 2005
Location: Spain
Posts: 15
|
For exporting reg keys data containing paths. For example, if the Data of a REG_SZ is "E:\My Things\My Thing.myext", the exported reg key won't work with your Registry Plugin. At least, it didnt for me. The hex conversion isn't right.
Last edited by XPero; 8th January 2006 at 15:00. |
![]() |
![]() |
![]() |
#35 | |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Registry plugin was successfully tested with all my registry in Windows 95/Me/XP. There few paths in it
![]() Quote:
|
|
![]() |
![]() |
![]() |
#36 |
Junior Member
Join Date: Aug 2005
Location: Spain
Posts: 15
|
I will post later next week (busy at the moment) the reg file created by your plugin and the one created using Regedit.exe so you can compare them.
|
![]() |
![]() |
![]() |
#37 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
OK. And I hope you use the latest version.
|
![]() |
![]() |
![]() |
#38 |
Junior Member
Join Date: Aug 2005
Location: Spain
Posts: 15
|
Works now with latest version. Thanks
|
![]() |
![]() |
![]() |
#39 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
New: "PPC-Registry" plugin - registry plugin for Pocket PC. All thanks to Thomas Bednarz (Smart Solutions AG)
Changed: registry::Read reduce number of parameters Fixed: registry::SaveKey does not convert short roots to long (HKLM->HKEY_LOCAL_MACHINE) Updated: "ConvFunc.h" to v1.5 Updated: "StrFunc.h" to v1.6 Changed: Now plugin used header "Registry.nsh" ("PPC-Registry.nsh") for custom user variables and better compile errors check. Update from previous versions: - Insert line in script: !include "Registry.nsh" - Replace: registry::Open -> ${registry::Open} ... - Replace: .r0 -> $0, .r1 -> $1 ... .R0 -> $R0, .R1 -> $R1 ... "Registry" plugin v2.0 |
![]() |
![]() |
![]() |
#40 |
Major Dude
Join Date: May 2003
Posts: 681
|
This reg_multi_sz is not working
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager:PendingFileRenameOperations variable only contains the first line - values are seperated by an empty line eg: code: Greets, Brummelchen |
![]() |
![]() |
![]() |
|
Tags |
plug-in, registry |
Thread Tools | Search this Thread |
Display Modes | |
|
|