Windows registry is special database used to store a lot of information about system, user, network and other components. Registry requires privileged access in order to read, write, change and delete keys and their related values. In this tutorial we will look operations like read, write, change and delete on the registry.
Regedit is a GUI tool used to list, write, change, delete, import and export registry keys in Windows operating systems. Regedit can be opened different ways but most popular and easy ways is providing
regedit command into windows run like below.
As previous stated operations on registry needs Administrator privileges following
User Account Control prompt will appear to gain these privileges. We will simply click
We will get
Registry Editor like below. Registry Editor left sidebar is used to navigate in registry tree and right area is used to list currently selected keys, values and sub keys.
We can see that following root or main keys are listed.
- HKEY_CLASSES_ROOT key contains file name extensions associations and COM class registration information
- HKEY_CURRENT_USER key contains preferences of the current user such as variables, printers, network connections etc
- HKEY_LOCAL_MACHINE key contains configurations about all users inWindows.
- HKEY_USERS key contains all user-specific data required by operations system and applications.
- HKEY_CURRENT_CONFIG key does not contain any information itself but acts as a pointer about the hardware information.
List Existing Key
As a GUI based editor we can navigate from left side bar to the key we want to list. Another ways to list a key is searching it in registry database. We can open search form by simply using
CTRL+F shortcut or using
Find from menu bar like below.
Now we will get a
Find Form like below. We will input the search term. There is 3 structures we can specifically look we can disable some of them.
Keyswill search in keys
Valueswill search in values
Datawill search in data
We can also set
Match whole string only to match whole word not a part of word.
Keep in mind that the search operation will be done currently selected key and its subs keys recursively. For example in the following screenshot the
HKEY_CURRENT_USER key and sub keys will be searched. By selecting
Computer we can search in all keys and sub keys
Add New Key
We can add new key just clicking the keys we want to add as child.
Add New Data
We can add new data similar to key but we need to select one of the datatypes like below.
Following data types are provided
String Valueis generally used to store text or character data like user name, variable name etc.
Binary Valueis used to store binary and boolean data
DWORD Valueis used to store 8 bit or 1-byte data
QDWORD Valueis used to store 16 bit or 2-byte data
Multi-String Valueis used to store multiple string values
Expendable String Value
Remove Registry Key
Registry key can be removed with right click on the key we want to remove.
Remove Registry Data
Removing data is similar to the removing key. We will just right click to the key we want to delete where this will open a menu and then left click to the
Delete from the menu like below.
Modify Registry Data
We can modify registry data like below. We will just right click to the key we want to delete where this will open a menu and then left click to the
Modify from the menu like below.