The Windows registry contains data of different types. The set of supported data types is larger than most people realize. As Table 1, page 6, shows, the registry's programming interface accepts 12 data types. This set is significantly larger than most people need. In most cases, you need only three data types: strings (REG_SZ), 32-bit integers (REG_DWORD), and binary streams (REG_BINARY). In addition, two more data types are worth mentioning, even though they're infrequently used. These data types are multiple strings (REG_MULTI_SZ) and expandable strings (REG_EXPAND_SZ). Before I discuss how these data types differ, let's look at how you typically handle them in scripts.
Accessing and Manipulating Data Types
To identify the registry's data types in code, you use the names I've listed in the first column of Table 1. If you use Windows Script Host (WSH) to access the registry, you can use only the REG_BINARY, REG_DWORD, REG_EXPAND_SZ, and REG_SZ data types. This limitation is intrinsic to the RegRead, RegWrite, and RegDelete methods of the WshShell object that WSH exposes to work with the registry. If you use another set of COM objects to access the registry, you can use more data types. . . .