How do I add a Windows registry key?

Updated: 01/24/2018 by Computer Hope

Caution: Before editing or changing anything in the Microsoft Windows registry, it's recommended that you backup the registry. We also highly recommend that anyone new to the registry become familiar with all the Windows registry basics.

Tip: See our how do I open and edit the Windows registry document if you're unfamiliar with how to open the registry.

In the Windows Registry Editor, move to the registry key you want to edit. For example, to add a new entry into Run section of Windows, we would move to the below registry key (folder).

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Once in the appropriate key, determine the type of value you want to add. The most common types of values are the String (REG_SZ) and DWORD (REG_DWORD) values. For a list of all the available value types and descriptions, see our registry definition.

Caution: Do not guess the type of registry value to add. If the documentation you're reading does not indicate the value type, we suggest doing additional research instead of guessing.

Add Windows registry valueOnce you've determined the value type, right-click on a blank portion in the right-pane that contains all the values and select New, as shown in the picture. Alternatively, with the registry key highlighted, click Edit, and then New.

As can be seen in the picture, the New menu you'll be given a list of registry values that can be added, for this example we will be adding a new String Value.

After selecting the registry value, you'll be prompted for a new name for the value. After entering the name of the value, double-click the value name to edit the values data and once completed click Ok. After all changes have been made the registry Editor can be closed and we suggest restarting the computer.

If problems exist after restarting the computer, enter the registry again, and make sure the value's name and data are correct. If you're unable to boot into Windows, boot the computer into Safe Mode and edit or restore the registry from within Safe Mode.

Additional information