A registry (.reg) file is a text file that contains registry key paths, value names, and values. The key paths always begin with one of the five root key names: HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, or HKEY_CURRENT_CONFIG. The root key names designate the beginning location in the registry to update. For example, HKEY_LOCAL_MACHINE\SOFTWARE\xxx123abc specifies the xxx123abc subkey below the HKEY_LOCAL_MACHINE\SOFTWARE path. Below the key path in the registry file are value names and value pairs, collectively referred to as a registry entry. The registry can write any of the following data types for each registry entry: String, Binary, DWORD, Expandable String, or Multi-String. As Table A shows, in the registry file, the registry entries should consist of the following elements, with no spaces between those elements:

  • The data type and the specified number enclosed in quotation marks. (The number never changes.) For the String data type, you don't include a number.
  • An equals sign (=).
  • A text prefix.
  • A colon (:). For the String data type, you don't include a colon.
  • The actual value. For the String data type, you must enclose the string in quotation marks.