Skip to Main Content
C# in a Nutshell
book

C# in a Nutshell

by Ben Albahari, Ted Neward, Peter Drayton
March 2002
Intermediate to advanced content levelIntermediate to advanced
864 pages
31h 8m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell

Name

Registry

Synopsis

This class is the starting point when using the Windows registry, which is the central repository used by most Windows applications for storing user-specific settings and preferences. Each static field of this class represents a root RegistryKey object, which has values and multiple levels of subkeys. These keys are read-only, but can be manipulated using the methods of the RegistryKey class.

Most applications store their settings in CurrentUser (HKEY_CURRENT_USER). The recommended standard is to use the Software subkey, create a subkey for your organization, and then create a subkey for each specific application (for example, Internet Explorer preferences are stored in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer). Analogous global settings that should affect all users on the current computer can be placed in a similar subkey in LocalMachine (HKEY_LOCAL_MACHINE). For example, setup programs often use this key to store information about installed applications. The full collection of user settings for all the users of the current computer can be retrieved from the Users key, as can the default settings for new users, which are contained in the .DEFAULT subkey of users. CurrentUser is actually a mapped subkey of Users, much as CurrentConfig is a subkey of LocalMachine.

The ClassesRoot key contains information used for Windows 3.1-compatible DDE and OLE support. Information for file viewers, Windows Explorer extensions, and file associations is also ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 8.0 in a Nutshell

C# 8.0 in a Nutshell

Joseph Albahari, Eric Johannsen
C# 10 in a Nutshell

C# 10 in a Nutshell

Joseph Albahari
C# in a Nutshell, Second Edition

C# in a Nutshell, Second Edition

Peter Drayton, Ben Albahari, Ted Neward
Code like a Pro in C#

Code like a Pro in C#

Jort Rodenburg

Publisher Resources

ISBN: 0596001819Catalog PageErrata