Although the registry doesn't automatically expand environment variables, the WSH object model's ExpandEnvironmentStrings method does. This method automatically expands a string that needs to be expanded but leaves the raw text intact. You can even pass a plain string to the method without incurring an error. So, if you use environment variables, I suggest that you always use this method to filter data you read from the registry. That way, you can make sure you always work with fully expanded strings.
Using ExpandEnvironmentStrings is easy. You just pass the string you want to expand to the method. For example, the code
MsgBox _
shell.ExpandEnvironment
Strings(strText)
expands then displays the string in strText.
Integers
As Table 1 shows, the registry supports several 32- and 64-bit integers. However, if you use WSH, you can only use 32-bit integers (i.e., REG_DWORD).
The registry also supports two ways to format the bytes that make up a number: Little Endian and Big Endian. The Little Endian format stores a number from the lowest byte (hence, little end) to the highest byte. For example, the Little Endian format stores the value 0x12345678 as the binary sequence
0x78 0x56 0x34 0x12
Microsoft designed all Windows platforms to use the Little Endian format. . . .