Prev Previous Post   Next Post Next
Old 10th March 2016, 20:13   #1
pkonduru
Member
 
Join Date: Jul 2015
Posts: 62
EnumRegkey Multiple values

Hi All,

I am trying to read a registry and get some values and store them on the fly . The below code works for finding and storing one matched key. How do I store the value of the key in a variable on the fly. This is what I have so far:


Var myFound
StrCpy $0 0
loop:
EnumRegKey $1 HKLM System\CurrentControlSet\services $0
StrCmp $1 "" done
${StrContains} $R1 "MySrch" "$1"
StrCmp $R1 "" notfound
StrCpy $myFound$1
MessageBox MB_OK 'Found string $1'
IntOp $0 $0 + 1
Goto loop
notfound:
IntOp $0 $0 + 1
goto loop
done:

As you can see the $myFound has the first match it finds in the registry. But there could be more than one "MySrch" keys in the registry. How Do I store the next occurance into a different variable?
pkonduru is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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