How to Add a Registry Key
Adding a registry key in Windows is accomplished using .reg files. The Windows registry is a large file that holds the system information, as well as application settings. Programmers can create .reg files that are installed manually by the user. Adding a registry key involves knowing the location of the settings and the values needed to set application preferences. Additionally, these files have a specific format to properly install using the registry user interface.
Instructions
-
-
1
Create the format for the .reg file. Open Notepad and enter the syntax for a registry file. The following is the syntax for a .reg file to install settings on a computer:
TheVersion
BlankLineNoText
[PathNumber1]
"KeyOne"="DataTypeOne:DataValueOne"
"KeyTwo"="DataTypeTwo:DataValueTwo"
BlankLineDistinguishesNextKey
[PathNumber2]
"KeyThree"="DataTypeThree:DataValueThree" -
2
Replace the basic syntax with your registry entries. The following is an example of a registry entry file that creates a dword value in the Windows system properties.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_ MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
"MyNewKey" = "DWORD:ThisIsMyNewSetting" -
-
3
Save the file to a directory on the computer. Make sure it has the extension .reg.
-
4
Click the Windows "Start" button and select "Run." Enter "regedit" into the textbox and press the "Enter" key. This opens the registry editor where the key value is imported.
-
5
Click the "File" menu and select "Import." This opens a dialog box where you need to select the file you saved in Step 3. Click "OK" once the file is selected. At this point, the new registry value is created and stored.
-
6
Close the registry window and reboot the computer for the changes to take effect.
-
1