Reference/EnumRegKey: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=EnumRegKey= user_var(output) root_key subkey index Set user variable $x with the name of the 'index'th registry key in root_key\Subkey. Valid values for root_key are listed u...")
 
Line 12: Line 12:
   MessageBox MB_YESNO|MB_ICONQUESTION "$1$\n$\nMore?" IDYES loop
   MessageBox MB_YESNO|MB_ICONQUESTION "$1$\n$\nMore?" IDYES loop
done:</highlight-nsis>
done:</highlight-nsis>
''Command introduced with NSIS v1.50''

Revision as of 20:28, 4 June 2013

EnumRegKey

user_var(output) root_key subkey index

Set user variable $x with the name of the 'index'th registry key in root_key\Subkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string if there are no more keys, and returns an empty string and sets the error flag if there is an error.

StrCpy $0 0
loop:
  EnumRegKey $1 HKLM Software $0
  StrCmp $1 "" done
  IntOp $0 $0 + 1
  MessageBox MB_YESNO|MB_ICONQUESTION "$1$\n$\nMore?" IDYES loop
done:

Command introduced with NSIS v1.50