How to add a Windows registry key

Updated: 06/02/2020 by Computer Hope

When troubleshooting computer problems or modifying settings, it may be necessary to add a new key value to the Windows registry. Follow the steps below for help on how to add a Windows registry key.

Caution

Before editing or changing anything in the Microsoft Windows registry, we recommend you back up the registry. We also highly recommend anyone new to the registry become familiar with all the Windows registry basics.

Add Windows registry key

Tip

For help with opening the registry, see: How to open and edit the Windows 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 value

Once you've determined the value type, right-click a blank portion in the right pane containing all the values and select New. Alternatively, with the registry key highlighted, in the menu bar, click Edit and select New.

As the picture shows, the New menu provides a list of registry values that can be added. For this example, we are 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 are made, the Windows Registry Editor can be closed. Restart the computer to verify the new registry key works correctly.

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.