Using DWORD vs. QWORD When Adding Values to Windows Registry
[responsivevoice_button voice="US English Male" buttontext="Listen to Post"]
When you are working with the Windows 10 registry, you may have seen instructions telling you to add a REG_DWORD (32-bit) Value. You can also add a REG_QWORD (64-bit) Value. When you add a new value, the options look like the following.DWORD (32-bit) vs. QWORD (64-bit)
First of all, I just want to make it clear that whether to use DWORD (32-bit) value or QWORD (64-bit) value has absolutely nothing to do with your Windows 10 version (32-bit vs. 64-bit). When you store data under a registry, you have to specify certain values and the type of data that is being stored. For example, the REG_DWORD value can store a type of data that’s a 32-bit number and REG_QWORD value can store a type of data that’s a 64-bit number. These numbers (32-bit or 64-bit) do not correspond to the Windows 10 operating systems. They represent the type of data that will be stored in a value. The REG-DWORD value stores a 32-bit number and REG_QWORD value stores a 64-bit number. You should simply follow the instructions given to you in a document. If the instructions say to use DWORD then you use DWORD, if the instructions say to use QWORD then you use QWORD. So you shouldn't confuse them with the type of Windows 10 operating system (32-bit or 64-bit). Most of the entries you will see in Windows 10 registry are DWORD (32-bit) and most of the Windows 10 operating systems in use these days are Windows 64-bit. The following table describes the Windows registry values and types. Visit this Microsoft document for more details, including explanation of String Values and Byte Formats.Value | Type |
---|---|
REG_BINARY | Binary data in any form. |
REG_DWORD | A 32-bit number. |
REG_DWORD_LITTLE_ENDIAN | A 32-bit number in little-endian format. Windows is designed to run on little-endian computer architectures. Therefore, this value is defined as REG_DWORD in the Windows header files. |
REG_DWORD_BIG_ENDIAN | A 32-bit number in big-endian format. Some UNIX systems support big-endian architectures. |
REG_EXPAND_SZ | A null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions. To expand the environment variable references, use the ExpandEnvironmentStrings function. |
REG_LINK | A null-terminated Unicode string that contains the target path of a symbolic link that was created by calling the RegCreateKeyEx function with REG_OPTION_CREATE_LINK. |
REG_MULTI_SZ | A sequence of null-terminated strings, terminated by an empty string (\0). The following is an example: String1\0String2\0String3\0LastString\0\0 The first \0 terminates the first string, the second to the last \0 terminates the last string, and the final \0 terminates the sequence. Note that the final terminator must be factored into the length of the string. |
REG_NONE | No defined value type. |
REG_QWORD | A 64-bit number. |
REG_QWORD_LITTLE_ENDIAN | A 64-bit number in little-endian format. Windows is designed to run on little-endian computer architectures. Therefore, this value is defined as REG_QWORD in the Windows header files. |
REG_SZ | A null-terminated string. This will be either a Unicode or an ANSI string, depending on whether you use the Unicode or ANSI functions. |
Windows Registry Best Practices
There are a few things about the Windows registry you should always remember:- Back up your registry before making any changes.
- Anything you enter in the registry is case-sensitive, hyphen-sensitive, etc. So enter the values and data exactly as you see in the instructions.
- Although it's not common, incorrect entries or changes to the Windows registry can potentially corrupt the registry and render your computer unusable. Therefore, ideally you first want to back up your computer, and then backup your registry before you make any changes to the registry.
Thanks for reading my article. If you are interested in IT training & consulting services, please reach out to me. Visit ZubairAlexander.com for information on my professional background. |
Copyright © 2020 SeattlePro Enterprises, LLC. All rights reserved.
Leave a Comment