Every registry entry has a data type, which represents the specific kind of data that the entry can store. Although nine data types exist, when you're administering registries you'll probably run into only the following types.

REG_BINARY
Entries that use a REG_BINARY data type are entries in which the data is raw binary data (i.e., without terminators). This data type is used mostly for hardware-component information.

Registry editors can display the data—and you can edit it—in either binary or hexadecimal format. In regedit, double-click a REG_BINARY entry to see its contents in binary format. In regedt32, select the entry and choose View, Display Binary Data from the menu bar to open a window that shows the data in binary format. (If you choose Edit, Binary from the menu bar, the Binary Editor opens and displays the contents in hex format.)

REG_DWORD
The REG_DWORD data type is a double word: two 16-bit words, making the value 32 bits. REG_DWORD is the most common data type in the registry. You'll find entries of this type that contain device driver information, Boolean values, quantities (e.g., the number of seconds that can elapse before something happens or doesn't happen), and other assorted information.

Registry editors display REG_DWORD entries in hex format, but you can switch to decimal or binary format (depending on the entry) when you need to perform an edit. I can't convert hex format to anything in my head, so when I want to change a figure such as a timeout interval, I need to change the format to accomplish my task.

REG_EXPAND_SZ
The REG_EXPAND_SZ entry type applies to entries that include one or more variables that an OS service or an application needs to resolve. The variables are the same variables you use in batch files and scripts (e.g., \%systemroot%, \%username%). I've never figured out why the registry doesn't resolve the variable and pass it to the requesting service or program.

REG_MULTI_SZ
Data entries that comprise multiple text strings use the REG_MULTI_
SZ data type. Commas or spaces separate the strings, and two null characters (which the registry editors don't display) terminate the entry. When applications do a lookup on any REG_MULTI_SZ entry, they receive the entire entry; applications can't ask for a specific string. (This information is important to know if you're a programmer.)

In regedit, the editing window displays binary data (although you can see the text on the right side of the window). In regedt32, choose Edit, Multi String from the menu bar, or double-click the listing to view the complete entry.

REG_SZ
Entries of type REG_SZ are fixed-length text strings. Most of the entries that use this type are either Boolean or have short text string values. This data type is common and probably arises almost as frequently as the REG_DWORD type. The notation SZ means String/Zero byte termination; the entries are terminated with a zero byte at the end (i.e., a zero is added to the end of the string). Both registry editors hide the terminating zero, so you don't need to think about it (unless you're writing a software application that manipulates the registry, in which case you must remember to pay attention to the terminating byte).

When you view or edit an entry of this type in regedit, the window that opens is titled String Editor. The regedit editing window displays the name of the value. In regedt32, the window is titled Edit String. Regedt32 doesn't display the name of the value in the editing window, so if you have a short memory span, you'll need to drag the editing window out of the way to see the selected entry.