Select the product you need help with
How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) fileArticle ID: 310516 - View products that this article applies to. This article was previously published under Q310516 To continue receiving security updates for Windows, make sure you're running Windows XP with Service Pack 3 (SP3).
For more information, refer to this Microsoft web page: Support is ending for some versions of Windows |
| Data Type | DataType in .reg |
| REG_BINARY | hexadecimal |
| REG_DWORD | dword |
| REG_EXPAND_SZ | hexadecimal(2) |
| REG_MULTI_SZ | hexadecimal(7) |
256986
DataValuex immediately follows the colon (or the equal sign with REG_SZ) and must be in the appropriate format (for example, string or hexadecimal). Use hexadecimal format for binary data items.
(http://support.microsoft.com/kb/256986/
)
Description of the Microsoft Windows registry
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.
Adding Registry Subkeys or Adding and Changing Registry Values
To add a registry subkey or add or change a registry value, make the appropriate changes in the registry, and then export the appropriate subkey or subkeys. Exported registry subkeys are automatically saved as .reg files. To make changes to the registry and export your changes to a .reg file, follow these steps:- 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.
Deleting Registry Keys and Values
To delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:HKEY_LOCAL_MACHINE\Software
HKEY_LOCAL_MACHINE\Software\Test
[
To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:-HKEY_LOCAL_MACHINE\Software\Test
]HKEY_LOCAL_MACHINE\Software\Test
HKEY_LOCAL_MACHINE\Software\Test
"TestValue"=-
Renaming Registry Keys and Values
To rename a key or value, delete the key or value, and then create a new key or value with the new name.Distributing Registry Changes
You can send a .reg file to users in an e-mail message, put a .reg file on a network share and direct users to the network share to run it, or you can add a command to the users' logon scripts to automatically import the .reg file when they log on. When users run the .reg file, they receive the following messages:If the user clicks Yes, the user receives the following message: Regedit.exe supports a /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:regedit.exe /s path of .reg file
You can also use Group Policy or System Policy to distribute registry changes across your network. For additional information, visit the following Microsoft Web site:http://msdn2.microsoft.com/en-us/library/ms954395.aspx
Note If the changes work, you can send the registration file to the appropriate users on the network.
(http://msdn2.microsoft.com/en-us/library/ms954395.aspx)
Properties
Article ID: 310516 - Last Review: June 28, 2012 - Revision: 7.0
APPLIES TO
- Microsoft Windows Server 2003, Enterprise x64 Edition
- Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
- Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
- Microsoft Windows Server 2003, Standard Edition (32-bit x86)
- Microsoft Windows Server 2003, Web Edition
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
- Microsoft Windows XP Professional x64 Edition
- Microsoft Windows XP Media Center Edition 2005 Update Rollup 2
- Microsoft Windows XP Tablet PC Edition
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional Edition
- Microsoft Windows 2000 Server
- Microsoft Windows NT Server 4.0 Standard Edition
- Microsoft Windows NT Workstation 4.0 Developer Edition
- Microsoft Windows Small Business Server 2003 Premium Edition
- Microsoft Windows Small Business Server 2003 Standard Edition
- Windows Server 2008 Datacenter
- Windows Server 2008 Enterprise
- Windows Server 2008 for Itanium-Based Systems
- Windows Server 2008 Foundation
- Windows Server 2008 R2 Datacenter
- Windows Server 2008 R2 Enterprise
- Windows Server 2008 R2 for Embedded Systems
- Windows Server 2008 R2 for Itanium-Based Systems
- Windows Server 2008 R2 Foundation
- Windows Server 2008 R2 Standard
- Windows 7 Enterprise
- Windows 7 Home Basic
- Windows 7 Home Premium
- Windows 7 Professional
- Windows 7 Starter
- Windows 7 Ultimate
- Windows Vista Business
- Windows Vista Enterprise
- Windows Vista Home Basic
- Windows Vista Home Premium
- Windows Vista Starter
- Windows Vista Ultimate
- Windows Server 2008 Datacenter without Hyper-V
- Windows Server 2008 Enterprise without Hyper-V
- Windows Server 2008 R2 Datacenter without Hyper-V
- Windows Server 2008 R2 Enterprise without Hyper-V
- Windows Server 2008 R2 Service Pack 1
- Windows Server 2008 R2 Standard without Hyper-V
- Windows Server 2008 Service Pack 2
- Windows Server 2008 Standard without Hyper-V
- Windows Vista Business 64-bit Edition
- Windows Vista Enterprise 64-bit Edition
- Windows Vista Home Basic 64-bit Edition
- Windows Vista Home Premium 64-bit Edition
- Windows Vista Service Pack 1
- Windows Vista Service Pack 2
- Windows Vista Ultimate 64-bit Edition
- Windows 7 Professional for Embedded Systems
- Windows 7 Service Pack 1
- Windows 7 Ultimate for Embedded Systems
Keywords: | kbenv kbhowtomaster KB310516 |
Article Translations
- (الشرق الاوسط (العربية
- Brasil (Português)
- Česká republika (Čeština)
- Danmark (Dansk)
- Deutschland (Deutsch)
- Eesti (Eesti)
- España, Latinoamérica (Español)
- France (Français)
- Hrvatska (Hrvatski)
- Indonesia (Bahasa Indonesia)
- Italia (Italiano)
- Lietuva (Lietuvių)
- Magyarország (Magyar)
- Nederland (Nederlands)
- Norge (Norsk Bokmål)
- Polska (Polski)
- Portugal (Português)
- România (Română)
- Slovenija (Slovenščina)
- Slovenská Republika (Slovenčina)
- Srbija (Srpski)
- Suomi (Suomi)
- Sverige (Svenska)
- Türkiye (Türkçe)
- Việt Nam (Tiếng Việt)
- Ελλάδα (Ελληνικά)
- България (български)
- Қазақстан (Қазақ)
- Россия (Русский)
- भारत (हिंदी)
- ไทย (ไทย)
- 대한민국 (한국어)
- 中国 (简体中文)
- 台灣 (繁體中文)
- 日本 (日本語)


Back to the top








