Board index » delphi » Registry - Key's default value

Registry - Key's default value

If one opens Regedit, they will discover that every key has a 'default
value'. How might one then go about reading/writing this value, using the
TRegistry object?

TiA

P.S. Where is the Registry stored on the computer? Is it in a file
somewhere, or is it written directly onto the disk?

 

Re:Registry - Key's default value


Quote
Sean Hamilton wrote:

> If one opens Regedit, they will discover that every key has a 'default
> value'. How might one then go about reading/writing this value, using the
> TRegistry object?

Just open the key and specify an empty string as Name parameter to
ReadString or WriteString.

Quote
> P.S. Where is the Registry stored on the computer? Is it in a file
> somewhere, or is it written directly onto the disk?

In Windows95/98 the registry is stored in the files SYSTEM.DAT and
USER.DAT in the Windows directory. If you have different user profiles
enabled, each user has his own USER.DAT in the directory
\Windows\Profiles\<user>. Don't know how it is on NT.

Gerhard

Other Threads