Thread: Registry plugin
View Single Post
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