I can read the value of the key n开发者_StackOverflow社区ame "UpdateCheck" under
HKEY_LOCAL_MACHINE\SOFTWARE\CCleaner\
with Shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\CCleaner\UpdateCheck")
But I cannot read that of the key name "(Default)" .
Shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\CCleaner\Default")
How to read it?
Just pass the key name to RegRead and you'll get the default value. E.g.:
Shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\CCleaner\")
NOTE: Notice the trailing \
in the regkey path. If that is missed out, it will try to read string value CCleaner
from HKEY_LOCAL_MACHINE\SOFTWARE
. Refer below .reg file snippet for more understanding.
[HKEY_LOCAL_MACHINE\SOFTWARE]
"CCleaner"="Some string value"
[HKEY_LOCAL_MACHINE\SOFTWARE\CCleaner]
@="some-default-value"
精彩评论