Skip to content
⌘ NSIS Forum Archive

Registry plugin

229 posts

Instructor#
If anyone can test this version of the registry plugin for Pocket PC?
XPero#edited
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.
Instructor#
Registry plugin was successfully tested with all my registry in Windows 95/Me/XP. There few paths in it 🙂
the exported reg key won't work with your Registry Plugin
What the plugin call, what the errorlevel, what the output file, what your key contents when you exporting it with the regedit.exe?
XPero#
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.
Instructor#
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
Brummelchen#
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:

\??\C:\DOKUME~1\user\LOKALE~1\Temp\~nsu.tmp\Au_.exe

\??\C:\DOKUME~1\user\LOKALE~1\Temp\~nsu.tmp\Au_.exe

\??\C:\DOKUME~1\user\LOKALE~1\Temp\nse274.tmp\registry.dll
Instructor#
"PendingFileRenameOperations" value has two NULL characters normally this means that value ended (one NULL character - end of line)

"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#edited
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]
Brummelchen#edited
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:
  ;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} 
Brummelchen#
somethings really going bad now - the installer quits on starting the plugin and remains the temp folder
Instructor#edited
Fixed: registry::Read REG_MULTI_SZ value problems ( take two 🙂 ).


"Registry" plugin v2.2
Brummelchen#
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
Instructor#
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).
"PendingFileRenameOperations"=hex(7):00,00
Brummelchen#
well - here it has only one zero 😉
can you code it that if reg_multi_sz starts with zero it returns empty ?
Instructor#
Fixed: registry::WriteExtra append REG_MULTI_SZ value only after new line.


"Registry" plugin v2.3
Instructor#
Fixed: improved PPC-registry plugin code, many bugs fixed (thanks Peter Beedell)


"Registry" plugin v2.4
rmccue#
Is it possible to allow the appending of registry keys to an already created file and exporting more than one key at a time?
Instructor#
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.
rxs2k5#
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
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