Old 21st February 2006, 07:08   #41
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
"PendingFileRenameOperations" value has two NULL characters normally this means that value ended (one NULL character - end of line)
code:

"PendingFileRenameOperations"=hex(7):5c,3f,3f,5c,43,3a,5c,57,49,4e,4e,54,5c,73,\
79,73,74,65,6d,33,32,5c,73,70,6f,6f,6c,5c,44,52,49,56,45,52,53,5c,43,4f,4c,\
4f,52,5c,4e,65,77,00,00,5c,3f,3f,5c,43,3a,5c,44,4f,43,55,4d,45,7e,31,5c,73,\
61,61,5c,4c,4f,43,41,4c,53,7e,31,5c,54,65,6d,70,5c,6e,73,61,31,42,38,42,2e,\
74,6d,70,5c,52,65,67,69,73,74,72,79,2e,64,6c,6c,00,00,5c,3f,3f,5c,43,3a,5c ...


I'll see what I can do.
Instructor is offline   Reply With Quote
Old 21st February 2006, 07:57   #42
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Fixed: registry::Read interpret empty line of REG_MULTI_SZ value as end of value.
Updated: "ConvFunc.h" to v1.6


"Registry" plugin v2.1

[deleted]

Last edited by Instructor; 21st February 2006 at 10:52.
Instructor is offline   Reply With Quote
Old 21st February 2006, 09:43   #43
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
Thank you much top da man ^^

erks, sorry - nearly.

when i empty that key manually this remains

"PendingFileRenameOperations"=hex(7):00

registry::read shows me a blank value.

maybe you can fix this too ?


some nasty code to avoid it:
PHP Code:
  ;pending operations ?
  
ClearErrors
    
${registry::Read"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager" "PendingFileRenameOperations" $R9 $R8
  StrCmp $R9 
"" no_pending
    StrLen $R8 $R9
    StrCmp $R8 1 no_pending
    
${registry::Unload}
    ;
your action here
      Quit
  no_pending
:
    ${
registry::Unload

Greets, Brummelchen

Last edited by Brummelchen; 21st February 2006 at 10:06.
Brummelchen is offline   Reply With Quote
Old 21st February 2006, 10:03   #44
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Please download v2.1 again, I forgot one thing in fix.
Instructor is offline   Reply With Quote
Old 21st February 2006, 10:16   #45
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
somethings really going bad now - the installer quits on starting the plugin and remains the temp folder

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 21st February 2006, 10:27   #46
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
I'm looking at it now.
Instructor is offline   Reply With Quote
Old 21st February 2006, 10:51   #47
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Fixed: registry::Read REG_MULTI_SZ value problems ( take two ).


"Registry" plugin v2.2
Attached Files
File Type: zip registry.zip (83.8 KB, 625 views)

Last edited by Instructor; 21st February 2006 at 11:37.
Instructor is offline   Reply With Quote
Old 21st February 2006, 10:57   #48
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
crash - fixed

zero value - not fixed
"PendingFileRenameOperations"=hex(7):00
(i get my message)

but no worry so far i use my nasty code above as long it cannot be fixed

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 21st February 2006, 11:09   #49
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Quote:
zero value - not fixed
"PendingFileRenameOperations"=hex(7):00
(i get my message)
REG_MULTI_SZ value requeres two NULL characters at the end (howbeit plugin read any REG_MULTI_SZ value).
code:
"PendingFileRenameOperations"=hex(7):00,00
Instructor is offline   Reply With Quote
Old 21st February 2006, 11:21   #50
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
well - here it has only one zero
can you code it that if reg_multi_sz starts with zero it returns empty ?

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 21st February 2006, 11:39   #51
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Done. Reuploaded.
Instructor is offline   Reply With Quote
Old 21st February 2006, 12:38   #52
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
perfect

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 3rd March 2006, 07:47   #53
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
-deleted-

P.S. I will try later

Last edited by Instructor; 3rd March 2006 at 08:49.
Instructor is offline   Reply With Quote
Old 3rd March 2006, 07:56   #54
WebMatze
Member
 
Join Date: Nov 2004
Location: France
Posts: 79
Zip is damaged...
WebMatze is offline   Reply With Quote
Old 3rd March 2006, 16:50   #55
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
No, try again

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 3rd March 2006, 21:01   #56
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Fixed: registry::WriteExtra append REG_MULTI_SZ value only after new line.


"Registry" plugin v2.3
Attached Files
File Type: zip registry.zip (83.9 KB, 1151 views)
Instructor is offline   Reply With Quote
Old 10th April 2006, 19:10   #57
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Fixed: improved PPC-registry plugin code, many bugs fixed (thanks Peter Beedell)


"Registry" plugin v2.4
Attached Files
File Type: zip registry.zip (84.0 KB, 493 views)
Instructor is offline   Reply With Quote
Old 20th April 2006, 03:52   #58
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Is it possible to allow the appending of registry keys to an already created file and exporting more than one key at a time?
rmccue is offline   Reply With Quote
Old 20th April 2006, 07:56   #59
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Quote:
Is it possible to allow the appending of registry keys to an already created file and exporting more than one key at a time?
Probably I can add this possibility.
Instructor is offline   Reply With Quote
Old 20th April 2006, 08:25   #60
rxs2k5
Member
 
Join Date: Apr 2006
Posts: 66
Instructor excellent plugin, thanks for your contributions.

This could at least worked out a bit to find the correct keys to change a setoutpath

btw
Quote:
Section /o "Search and write founded in text file" SearchAndWriteInFile
GetTempFileName $R0
FileOpen $R1 $R0 w
FileWrite $R1 'HKEY_CURRENT_CONFIG$\r$\n$\r$\n'

${registry::Open} "HKEY_CURRENT_CONFIG" "/B=1" $0
StrCmp $0 -1 0 loop
MessageBox MB_OK "Error" IDOK close

loop:
${registry::Find} $1 $2 $3 $4

StrCmp $4 '' close
StrCmp $4 'REG_KEY' 0 +3
FileWrite $R1 '$4:"$1\$2"$\r$\n'
goto +2
FileWrite $R1 '$4:"$1" "$2"="$3"$\r$\n'
goto loop

close:
${registry::Close}
${registry::Unload}
FileClose $R1

Exec '"notepad.exe" "$R0"'
SectionEnd
In the example u provided, about the search and write found, how can I able to make it search and write the searched registry into a filename.ini
rxs2k5 is offline   Reply With Quote
Old 20th April 2006, 08:57   #61
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Like this?
code:
Section /o "Search and write founded in text file" SearchAndWriteInFile
StrCpy $R0 HKEY_CURRENT_CONFIG

${registry::Open} "$R0" "/K=0 /B=1" $0
StrCmp $0 -1 0 loop
MessageBox MB_OK "Error" IDOK close

loop:
${registry::Find} $1 $2 $3 $4

StrCmp $4 '' close
WriteINIStr 'C:\filename.ini' '$R0\$1\$2' '$2' '$3'
goto loop

close:
${registry::Close}
${registry::Unload}
FileClose $R1

Exec '"notepad.exe" "C:\filename.ini"'
SectionEnd

Instructor is offline   Reply With Quote
Old 20th April 2006, 09:36   #62
rxs2k5
Member
 
Join Date: Apr 2006
Posts: 66
nice nice thanks
but how do I extent the search beside this
HKEY_CURRENT_CONFIG

like

HKEY_LOCAL_MACHINE " name of software " "the value" "data"
HKEY CURRENT USERS " Name of software " " the value" "data"
Quote:
Section /o "Search and write founded in text file" SearchAndWriteInFile
StrCpy $R0 HKEY_CURRENT_CONFIG

${registry::Open} "$R0" "/K=0 /B=1" $0
StrCmp $0 -1 0 loop
MessageBox MB_OK "Error" IDOK close

loop:
${registry::Find} $1 $2 $3 $4

StrCmp $4 '' close
WriteINIStr 'C:\filename.ini' '$R0\$1\$2' '$2' '$3'
goto loop

close:
${registry::Close}
${registry::Unload}
FileClose $R1

Exec '"notepad.exe" "C:\filename.ini"'
SectionEnd
rxs2k5 is offline   Reply With Quote
Old 20th April 2006, 10:01   #63
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Quote:
but how do I extent the search beside this
HKEY_CURRENT_CONFIG

like

HKEY_LOCAL_MACHINE " name of software " "the value" "data"
HKEY CURRENT USERS " Name of software " " the value" "data"
Don't understand. What your situation (what you trying to do)?
Instructor is offline   Reply With Quote
Old 20th April 2006, 11:19   #64
rxs2k5
Member
 
Join Date: Apr 2006
Posts: 66
Quote:
Section /o "Search and write founded in text file" SearchAndWriteInFile
StrCpy $R0 HKEY_CURRENT_User
StrCpy $R1 HKEY_Local_ Machine

${registry::Open} "$R0" "/K=0 /B=1" $0
StrCmp $0 -1 0 loop
MessageBox MB_OK "Error" IDOK close

loop:
${registry::Find} $1 $2 $3 $4

StrCmp $4 '' close
WriteINIStr 'C:\filename.ini' '$R0\$1\$2' '$2' '$3'
goto loop

close:
${registry::Close}
${registry::Unload}
FileClose $R1

Exec '"notepad.exe" "C:\filename.ini"'
SectionEnd
1.
If u look at the example above the HKEY_CURRENT_User which will be written into the filename.ini takes a long time to search since it will scan the entire registry on HKEY_CURRENT_User is there anyway to define it to search the material much faster and direct.

2. HKEY_CURRENT_User "Software\blah" "search string value" " string value data " is this possible to direct a search rather than a full scan of the HKEY_CURRENT_User.

3. this will be read by ReadINIStr afterwards when the search is being done since ReadINIStr requires section_name entry_name. Is there a possibility that your registry plugin can arrange this to fit into the search in ReadINIStr like this
ReadINIStr $0 $Temp\filename.ini example1 cool on the later part.


thanks again for replying
rxs2k5 is offline   Reply With Quote
Old 20th April 2006, 11:35   #65
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Quote:
is this possible to direct a search rather than a full scan of the HKEY_CURRENT_User
Direct search for what? For key "blah"?
Instructor is offline   Reply With Quote
Old 20th April 2006, 11:39   #66
rxs2k5
Member
 
Join Date: Apr 2006
Posts: 66
yes
rxs2k5 is offline   Reply With Quote
Old 20th April 2006, 11:48   #67
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
I'll answer little later
Instructor is offline   Reply With Quote
Old 20th April 2006, 11:58   #68
rxs2k5
Member
 
Join Date: Apr 2006
Posts: 66
ok I will be waiting when ur ready
rxs2k5 is offline   Reply With Quote
Old 20th April 2006, 14:00   #69
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
ok. I need to understand what you trying to do.
1. You know that registry key name is "blah"
2. You know that this key located somewhere in the "HKEY_CURRENT_USER\Software" (it can be "HKEY_CURRENT_USER\Software\123\blah" or "HKEY_CURRENT_USER\Software\Microsoft\blah" ...)
3. You need to find all this variants and write them to the ini file
Is this correct?
Instructor is offline   Reply With Quote
Old 20th April 2006, 14:44   #70
rxs2k5
Member
 
Join Date: Apr 2006
Posts: 66
yes !
rxs2k5 is offline   Reply With Quote
Old 20th April 2006, 15:15   #71
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
code:
Section /o "Search and write founded in text file" SearchAndWriteInFile
StrCpy $R0 "HKEY_CURRENT_USER" #Root
StrCpy $R1 "Software" #Subkey "Key1\Ke2\Key3"
StrCpy $R2 0

${registry::Open} "$R0\$R1" "/K=1 V=0 /S=0 /N='blah' /B=1" $0
StrCmp $0 -1 0 loop
MessageBox MB_OK "Error" IDOK close

loop:
${registry::Find} $1 $2 $3 $4

StrCmp $4 '' close
WriteINIStr 'C:\filename.ini' 'Example1' '$R2' '$R0\$1\$2'
IntOp $R2 $R2 + 1
goto loop

close:
${registry::Close}
${registry::Unload}

Exec '"notepad.exe" "C:\filename.ini"'
SectionEnd

Instructor is offline   Reply With Quote
Old 20th April 2006, 19:26   #72
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Added:    registry::SaveKey option /A=[0|1], /A=1 append data to the file
Changed: registry::RestoreKey some clean-up


"Registry" plugin v2.5
Attached Files
File Type: zip registry.zip (84.3 KB, 537 views)
Instructor is offline   Reply With Quote
Old 20th April 2006, 20:19   #73
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Fast fix: registry::Open does not reset variables (more then one call)


"Registry" plugin v2.6
Attached Files
File Type: zip registry.zip (84.5 KB, 544 views)
Instructor is offline   Reply With Quote
Old 10th May 2006, 20:07   #74
Deuce199
Junior Member
 
Join Date: May 2006
Posts: 4
Question Search Loop

I am using a search function in my registry program using your plugin. I am now using your append switch of savekey to append the found keys to a reg file and it works like a charm. This is my problem:

Say I search for Key1 in HKEY_Local_MAchine, so it find key1 and writes it to the reg file, i then have it loop back and search again. The problem is it will refind the first instance of key1 and keep going, never getting past that key, because it does not remember it did that. How or can you add function that will cause the search to continue from the point it stopped to write the information to a file. So it would continue from the first instance of key1 and go to the next instance? Is that possible?

Thanks,
Deuce199
Deuce199 is offline   Reply With Quote
Old 11th May 2006, 09:35   #75
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
registry::Find and registry::SaveKey uses the same stack I'll try to separate them.
Instructor is offline   Reply With Quote
Old 14th May 2006, 21:27   #76
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
With v2.7:
code:
Name "Output"
OutFile "Output.exe"

!include "Registry.nsh"

Section
StrCpy $R0 "HKEY_LOCAL_MACHINE" #Root
StrCpy $R1 "SOFTWARE\Microsoft" #Subkey

${registry::Open} "$R0\$R1" "/K=1 V=0 /S=0 /N='Key1' /B=1" $0
StrCmp $0 -1 0 loop
MessageBox MB_OK "Error" IDOK close

loop:
${registry::Find} $1 $2 $3 $4

StrCmp $4 '' close
${registry::SaveKey} "$R0\$1\$2" "C:\keys.reg" "/A=1 /B=1" $0
goto loop

close:
${registry::Close}
${registry::Unload}

Exec '"notepad.exe" C:\keys.reg'
SectionEnd

Instructor is offline   Reply With Quote
Old 14th May 2006, 21:31   #77
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Fixed: separate registry::Find and registry::SaveKey stacks. Now possible use them
          together.


"Registry" plugin v2.7
Attached Files
File Type: zip registry.zip (84.5 KB, 445 views)
Instructor is offline   Reply With Quote
Old 17th May 2006, 00:59   #78
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Updated: "StackFunc.h" to v1.8
Added: handles for search


"Registry" plugin v2.8
Attached Files
File Type: zip registry.zip (84.9 KB, 435 views)
Instructor is offline   Reply With Quote
Old 17th May 2006, 17:45   #79
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Cool! Awesome plugin, and getting even better,
thanks Instructor.
BTW a more detailed documentation would be great :-)

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 28th May 2006, 09:14   #80
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Updated: "StrFunc.h" to v1.7
Updated: "StackFunc.h" to v1.9
Updated: "ConvFunc.h" to v1.7


"Registry" plugin v2.9
Attached Files
File Type: zip registry.zip (86.2 KB, 662 views)
Instructor is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
plug-in, registry

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump