3

I can read the value of the key name "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?

Kev
  • 118,037
  • 53
  • 300
  • 385
tester
  • 31
  • 1
  • 2

1 Answers1

7

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"
anishsane
  • 20,270
  • 5
  • 40
  • 73
Steve
  • 141
  • 5