- This article is intended for advanced users, administrators, and IT Professionals.
- Importing Registration Entries (.reg) files is a feature of Regedit.exe and is not supported by Regedt32.exe. You can use Regedit.exe to make some changes to the registry on a Windows NT 4.0-based or Windows 2000-based computer, but some changes require Regedt32.exe. For example, you cannot add or change REG_EXPAND_SZ or REG_MULTI_SZ values with Regedit.exe on a Windows NT 4.0-based or Windows 2000-based computer. Regedt32.exe is the primary Registry Editor for Windows NT 4.0 and Windows 2000. If you must use Regedt32.exe, you cannot use Registration Entries (.reg) files to modify the registry. For more information about the differences between Regedit.exe and Regedt32.exe, click the following article number to view the article in the Microsoft Knowledge Base:
141377 Differences between Regedit.exe and Regedt32.exe
IN THIS TASK
back to the top
RegistryEditorVersion is either "Windows Registry Editor Version 5.00" for Windows 2000, Windows XP, and Windows Server 2003, or "REGEDIT4" for Windows 98 and Windows NT 4.0. The "REGEDIT4" header also works on Windows 2000-based, Windows XP-based, and Windows Server 2003-based computers.
Blank line is a blank line. This identifies the start of a new registry path. Each key or subkey is a new registry path. If you have several keys in your .reg file, blank lines can help you to examine and to troubleshoot the contents.
RegistryPathx is the path of the subkey that holds the first value you are importing. Enclose the path in square brackets, and separate each level of the hierarchy by a backslash. For example:
DataItemNamex is the name of the data item that you want to import. If a data item in your file does not exist in the registry, the .reg file adds it (with the value of the data item). If a data item does exist, the value in your .reg file overwrites the existing value. Quotation marks enclose the name of the data item. An equal sign (=) immediately follows the name of the data item.
DataTypex is the data type for the registry value and immediately follows the equal sign. For all the data types other than REG_SZ (a string value), a colon immediately follows the data type. If the data type is REG_SZ , do not include the data type value or colon. In this case, Regedit.exe assumes REG_SZ for the data type. The following table lists the typical registry data types:
|Data Type||DataType in .reg|
Note You can enter several data item lines for the same registry path.
Note the registry file should contain a blank line at the bottom of the file.
back to the top
- Click Start, click Run, type regedit in the Open box, and then click OK.
- Locate and then click the subkey that holds the registry item or items that you want to change.
- Click File, and then click Export.
This step backs up the subkey before you make any changes. You can import this file back into the registry later if your changes cause a problem.
- In the File name box, type a file name to use to save the .reg file with the original registry items, and then click Save.
Note Use a file name that reminds you of the contents, such as a reference to the name of the subkey.
- In the right pane, add or modify the registry items you want.
- Repeat steps 3 and 4 to export the subkey again, but use a different file name for the .reg file. You can use this .reg file to make your registry changes on another computer.
- Test your changes on the local computer. If they cause a problem, double-click the file that holds the backup of the original registry data to return the registry to its original state. If the changes work as expected, you can distribute the .reg you created in step 6 to other computers by using the methods in the "Distributing Registry Changes" section of this article.
back to the top/s command-line switch to not display these messages. For example, to silently run the .reg file (with the /s switch) from a login script batch file, use the following syntax:
back to the top
Article ID: 310516 - Last Review: Apr 18, 2017 - Revision: 2