Typo in your macro Vytautas...
Right after the EnumRegKey call you put a colon on the goto label, which causes a 'couldn't resolve the label' compile-time error.
"${Index}-Loop:"
; Check for Key
EnumRegKey $R0 ${ROOT} "${MAIN_KEY}" "$R1"
StrCmp $R0 "" "${Index}-False:"
that StrCmp line should read ...
StrCmp $R0 "" "${Index}-False"
I like your method, but it doesn't seem to work for me -- I haven't had luck with EnumRegKey and ReadRegStr either. Here's an example where I use a key that I know exists (looking at it in RegEdit):
Function Sample
!insertmacro KeyExists HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat 5.0" "DisplayName"
Pop $R0
IntCmp $R0 0 EndSample EndSample 0
;...code to handle stuff when we find the key ...
MessageBox MB_OK "Wow it found it!"
EndSample:
FunctionEnd
... I never see the dialog box, even though I know the key exists. I figure that at least 1 other person in this forum will have Acrobat 5 (reader) installed, so if you can make the above code work on your system as-is then my machine is horked somehow. If there's a mistake, please let me know where I went wrong!
NSIS 2.0b4, Win2K Pro ...
Thanks!!
AnalogKid
=^{D}