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
Comment