Skip to content
⌘ NSIS Forum Archive

subkey check

5 posts

Yathosho#

subkey check

i was thinking that
ReadRegStr $0 "HKLM" "SYSTEM\CurrentControlSet\Control\Terminal Server" "" 
would be checking if the subkey "Terminal Server" exist, but i always get an empty $0.
fluidz91#edited
I have the same problem !
I tried to find Anders' post but didn't find them with the answer.
How do you just verify if a registry subkey exists ?

Thx

EDIT : can it be done with EnumRegKey ?
Brummelchen#
  StrCpy $0 0
EnumRegKey $1 HKCU "SOFTWARE\Adobe\Acrobat Reader" $0
StrCmp $1 "" 0 regclean1
DeleteRegKey HKCU "SOFTWARE\Adobe\Acrobat Reader"
regclean1:
fluidz91#
thank you for the example code, i knew it had to be with EnumRegkey but didn't know how to cope with it ! ^^