Keys and values

As you've read up to this point, keys serve as containers in the registry. Keys can contain other keys (subkeys). Keys can also contain value entries, or simply, values. These are the "substance" of the registry. Values comprise three parts: name, data type, and value. The name identifies the setting. The data type describes the item's data format. The value is the actual data. The following list summarizes data types currently defined and used by the system:

♦ REG_BINARY. This data type stores the data in raw binary format, one value per entry. The Registry Editor displays this data type using hexadecimal format.

♦ REG_DWORD. This data type stores data as a four-byte number, one value per entry. The Registry Editor can display this data type in binary, hexadecimal, or decimal formats.

♦ REG_EXPAND_SZ. This is a variable-length string that includes variables that are expanded when the data is read by a program, service, and so on. The variables are represented by % signs; an example is the use of the %systemroot% variable to identify the root location of the Windows Server 2003 folder, such as a path entry to a file stored in systemroot\System32. One value is allowed per entry.

♦ REG_MULTI_SZ. This data type stores multiple string values in a single entry. String values within an item are separated by spaces, commas, or other such delimiters.

♦ REG_SZ. This data type stores a single, fixed-length string, and is the most common data type used in the registry.

♦ REG_FULL_RESOURCE_DESCRIPTOR. This data type stores a series of nested arrays, such as a resource list for a device driver or hardware component.

Was this article helpful?

0 0

Post a comment