Windows registry: open, modify, save, restore…

Windows registry open modify save restore…

The Windows Registry is an essential and sensitive component of the operating system. It is essential to fully understand its role and operation if you want to clean or modify it without doing any damage.

If you’re a regular Windows user, you’ve no doubt heard of the Registry, also known as the “registry base”. And for good reason: it is one of the most important elements of Microsoft’s operating system. Mysterious and even impressive for the uninitiated, the Registry is a precious and sensitive component of Windows, since it contains essential information and settings, both for installed software and for the system itself. No question of venturing into it lightly, and even less of modifying anything without being well informed beforehand!

The purpose of this practical sheet is precisely to briefly explain to you the essentials of its operation, as well as what to do – and not to do! – if you need to make changes to it.

What is the Windows Registry?

In the very first versions of Windows, the installed software was “linked” to the operating system by specific configuration files, characterized by the .ini extension. Subsequently, Microsoft collected all this information in a structured database called Registry. Microsoft also kept the win.ini and system.ini files for compatibility with older programs. The Windows Registry thus groups together all the system configuration information and software installed on the computer, including drivers, which avoids the multiplication of configuration files.

On a day-to-day basis, you never see the Register. But Windows and all software use it constantly to write or read information. Most of the settings that you adjust in Windows and in applications register there transparently, without your realizing it, through “classic” dialogs and preferences. But there is a way to view and modify the contents of the Registry: it is the Registry Editor, a tool included as standard in Windows. It is in this editor that we can intervene manually, to modify parameters to which we do not have direct access. But, like when you open the hood of a car to tinker with its engine, the use of the editor is reserved for experienced users because improper handling can have serious consequences and block the operation of the PC…

The Windows Registry is organized into several sections in a tree-like fashion, with “branches” called “keys” – each branch acts as a folder, with sub-branches – associated with parameters – called values ​​or data. By default, there are five main key branches.

  • HKEY_CLASSES_ROOT (or HKCR): this branch contains all file associations with applications.
  • HKEY_CURRENT_USER (or HKCU): this branch contains the parameters relating to the active user (you presumably!), classified into sub-categories, (Control Panel, Software, AppEvents, Keyboard Layout, Remote Access, Network, etc.).
  • HKEY_LOCAL_MACHINE (or HKLM): this branch contains all the settings related to the computer: Hardware (hardware configuration), Software (installed software settings), System (system information), Security (user accounts and passwords) , etc.
  • HKEY_USERS (or HKU): this branch contains settings specific to each Windows user (appearance, desktop configuration, Start menu options, accessibility settings, printing settings, etc.).
  • HKEY_CURRENT_CONFIG (or HKCC): this branch contains all the parameters related to the current software and hardware configuration of the PC. It is regenerated after each Windows startup. This is actually shortcut to the sub-branch HKEY_LOCAL_MACHINESYSTEMCurrentControlSetHardwareProfilesCurrent.

To access the Windows Registry, you must go through the Registry Editor tool.

  • Click on the start menuscroll down the list of applications until you reach the section Windows administrative toolsthen click Registry Editor.
16026752
  • If you prefer, you can also open Registry Editor with a command. Press the keys Windows+R to access the window Execute. Enter the command regedit, then press OK. This method works on Windows 7, 8 and 10.
16026797
  • Whichever method you use, the Registry Editor window opens.
    16026708

The Registry Editor window looks like a Windows Explorer window, with two parts: on the left, the keys organized into branches, like folders in a tree structure; on the right, the information relating to the selected key.

16026847
  • To see the contents of a key, double click on it. You can also single click to select it, then click on the small triangle in front. Do the same to “fold” a branch.
  • When a key is selected on the left, the associated information is automatically displayed in the right pane of the window, with a name, type and data.
24390932
  • There are different types of data in the registry. The most common are REG_SZ (standard text values, which contain easily readable and editable text), REG_DWORD (numerical values, which contain an integer in hexadecimal or binary),REG_MULTI_SZ (multiple text values, which contain a series of text values ​​separated by a particular character), REG_EXPAND_SZ (expandable text values ​​that contain generic text that Windows modifies depending on configuration) and REG_BINARY (binary values ​​that contain hard to decipher pure binary data).
  • To edit a value in the right pane, double-click it. A floating window appears and you can then modify the name and the value of the data in the appropriate fields.
24390933
  • Depending on the case, modify the data and validate by clicking on OK button or by pressing the enter key on your keyboard, or cancel with the cancel button Where Esc key. Note that your changes are automatically saved to the registry.
  • Be careful, do not modify anything in the Registry if you do not know what you are doing! If you absolutely have to modify elements, to make a repair or an improvement, proceed with caution and start by making a backup of the database (see below). And ideally, follow a step-by-step guide so you don’t go wrong! Any modification is at your own risk…

Before manipulating the Registry base, it is prudent – ​​and even imperative! – to make a backup.

  • Open Registry Editor, click menu File then on Export.
16026881
  • In the window Export Registry Filestart by checking the box All in the game Export scope (bottom) to save the whole database, with all the keys.
  • Give an explicit name to your file to find it later, for example Backup_Register_DateOfToday. Choose a dedicated folder on your disk or external media and click To register.
16026922
  • Your registry is now backed up and you can use the .reg file later to restore it if needed.

If you have a problem after editing or cleaning the Registry, you can try to solve it by restoring a previous version saved.

  • Open Windows Registry Editor, click menu File then on Import.
16027006
  • Use the explorer window to locate your backup file – it has the extension .reg –, select it, then click Open.
16027007
  • You can also directly double-click on the .reg file from Windows Explorer to load it into the editor and restore the database. However, this method does not always work, it is better to use the one described above.
  • Once imported, your backup file reverts to the previous registry configuration.

When software is installed, several keys and values ​​are created in various branches of the registry to ensure its operation and save its settings. In theory, these keys are erased when you uninstall the application. But even when left to the software-specific uninstaller, this housekeeping isn’t always done well, and the Registry may retain unnecessary keys.

And there arises a problem which divides the specialists. For some, it is necessary to delete these keys that have become useless because they clutter the Registry and slow down the computer. Others claim that it is useless, because these keys only occupy a few bytes and their presence does not interfere with the operation of the system. They even believe that a household can do more harm than good and recommend never cleaning the Registry.

Anyway, there are specialized utilities in registry cleaning. the best known is the essential CCleaner, a free software in its basic version, specialized in system and software optimization, which can take care of an automatic cleaning of the Registry. You can use it being aware of the problems that may result. Also, we advise you before any cleaning to make a backup of the Registry to be able to “go back” if you receive malfunctions after its application.

  • start with downloadr and install CCleaner on your computer.

Download CCleaner for Windows

  • Once the installation is complete, open CCleaner and click Register in the left menu.
16027048
  • In the game Registry Cleanermake sure all items are checked and click the button Look for errors.
16027050
  • Wait for the time of the analysis, then when it is finished, click on the button Fix selected errors.
16027075
  • In the warning window proposing to make a backup before the changes, click on Yes.
16027132
  • Save the file – it is named automatically with the date – on your disk or on an external medium.
16027133
  • CCleaner then displays the list of errors detected. Click on Fix all selected errors to solve problems at once. You can also click on the arrows to examine the errors encountered and decide on a case-by-case basis. Then click on the button Correct the error to resolve a particular error.
16027134
  • Once the errors have been corrected, click Close then quit CCleaner and restart your PC.

ccn1