Tagged: Operating System, Registry, Windows
- This topic has 0 replies, 1 voice, and was last updated 1 year ago by
Precious.
- AuthorPosts
- February 28, 2020 at 3:44 am #86776Spectator@precious
As a Windows user, has there ever been a time where you need to change a setting, perform a maneuver or open a file type and you cannot seem to find where to do it in your control panel? If yes (or no – doesn’t matter), you might want to know that there is another method of changing or customizing how your computer behaves to suit your wish (to an extent) – and it is not by downloading a third party app or to switch your OS. You can actually do it by changing some figures in a place called the Windows Registry; which is a database containing all or much of the configuration settings (for software and hardware), user preferences and installed programs on your computer.
The Windows Registry has been in operation since Windows 95 – and it has served the purpose of organizing the storage of system settings using a set of values that have control over a feature or behavior of the system. When you alter the value, you change the way your OS or your hardware behaves, sometimes immediately or after you restart your computer. This article explains the basic structure of the Windows Registry, the type of files and data stored, as well as a few exercises that demonstrates how to tweak features on your computer by changing the values of the Registry.
The Structure of the Windows Registry
The Windows Registry is a database that is accessible through an editor – to access this editor, simply open the search pane on your computer and type regedit. When the icon shows up, click on it and the registry would be open to you. As depicted in the images below.
Inside the Registry editor, you notice that the database is made up of different folders – these folders are called Hives. The sub-folders you see when you expand any of the hives are called Registry_Keys. Expanding these keys may lead more than one sub-folder or directly to a Value.
At the moment, there are five types of Hives in the registry, each of them contain a set of keys and values that perform a distinct function or control a set of features in the computer.
- HKCR (HKEY_CLASSES_ROOT): This hive_key describes the types of file system, file types, the extensions and settings for Object Linking and Embedding (OLE).
- HKCU (HKEY_CURRENT_USER): Contains the information about the currently logged user account and all the configurations, settings and user preferences for the account.
- HKLM (HKEY_LOCAL_MACHINE): This Hive_Key contains information about the software and hardware installations on your computer, as well as other related data. This information is accessed by the computer and used for all accounts that may be present on the system. Because of its inclusiveness and the vast area it spans – users often make the most changes to the system on this Hive.
- HKU (HKEY_USERS): This contains information about all the accounts that are created on the operating system, both general information and user-specific ones.
- HKCC (HKEY_CURRENT_CONFIG): This hive contains settings about each hardware component that is attached to your computer.
The Keys may be open or closed, depending on which the user is about to view or edit at the moment. But there are 6 types of values each key can contain.
- REG_SZ: This is a string value that enables single-line strings or variables to be stored in the registry. Values like variables that contain the path to a file are often stored as string values. They are the most commonly found values in the registry.
- REG_MULTI_SZ: This is a string array value but enables multiple-line strings or variables to be stored in the registry.
- REG_EXPAND_SZ: This is an expanded string value that usually contains dynamic (they can change, or be extended) environmental or system variables (dynamic variables that contain values useful by more than one software). Variables depicted like
%appdata%
or%windir%
are often stored as expanded string values. - REG_BINARY: This value allows attributes of a system to be defined as 0 or 1 (off or on – any can serve). For instance, a feature such as windows defender that is turned off or disabled on your computer may be depicted as 0. When changed to 1, the feature will be enabled or turned on.
- REG_DWORD: This value is similar to that of the binary – but differs in the sense that values it can contain may be hexadecimal or decimal (base 16 or base 10). But the value is a 32-bit value, and DWORD stands for Double-WORD.
- REG_QWORD: This value is almost the same as that of the DWORD, but different because its value is a 64-bit value and QWORD stands for Quad-WORD.
Now that the basic structure of the registry is known, it would be necessary to perform some operations using the registry editor. However, because changing any value in the registry could affect more than one feature of the operating system and the computer in general, it is necessary to create a backup of your entire registry – such that any resulting malfunction could easily be reversed by restoring the older version.
To backup your registry – there are two methods; a manual backup and a system restore point.
- Click on the File Menu on the editor and select export – a dialog box would open up.
- Select a directory you can easily remember – such as documents, then give your backup file a name.
- It is recommended that you save all the registry files such that a restore would be all inclusive – in that case, change your export range to all in the dialog box.
- Then Click Save. Your registry at that moment has been saved.
The second method is to create a system restore point.
- Search for create a restore point from the Start Menu search.
- When the search results have loaded, select create a restore point.
Follow the steps given to create a restore point.
With this backup, any changes you make in your registry can easily be reversed. Just click on the file menu and select import. Then select the .reg file where you stored the original value and click open.
How to Add, Edit and Delete Registry Keys and Values
To add a registry key;
- Navigate to the Hive where you want your key to be situated and right-click on it.
- Hover over the new option and when it extends, click on key.
- As the new key is formed, rename it to your desired name and you’re done.
To add a registry value;
- Navigate to the key where you want your value to exist in and right-click on it. Select new and then select any type of value of your choice.
- Once the value has been created, rename it then right-click on it and select modify.
- A window should open that allows you to change the default inputs of whatever value you created.
- After you have changed your value, save it and restart the registry, or restart your computer.
- To delete a value or a key, simply right-click on the key and select delete. You would be asked to confirm your choice. Confirm it and your choice key or value would be deleted.
The image below depicts a new key created called keyfile whose set of values include a single string whose data value has not been set.
The next section would give a few practical examples of changing features on your computer using the registry.
Example 1: How to make the Registry Editor Visible on the Control Panel (Adding a Registry File)
This example would need some direct creation of a .reg file without using the registry editor.
- On anywhere in your computer, open a notepad document.
Enter the following registry editing codes into the file.
12345678910111213141516171819202122232425Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\CLSID\{77708248-f839-436b-8919-527c410f48b9}]@="Registry Editor""InfoTip"="Starts the Registry Editor""System.ControlPanel.Category"="5"[HKEY_CLASSES_ROOT\CLSID\{77708248-f839-436b-8919-527c410f48b9}\DefaultIcon]@="%SYSTEMROOT%\\regedit.exe"[HKEY_CLASSES_ROOT\CLSID\{77708248-f839-436b-8919-527c410f48b9}\Shell][HKEY_CLASSES_ROOT\CLSID\{77708248-f839-436b-8919-527c410f48b9}\Shell\Open][HKEY_CLASSES_ROOT\CLSID\{77708248-f839-436b-8919-527c410f48b9}\Shell\Open\Command]@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\00,5c,00,72,00,65,00,67,00,65,00,64,00,69,00,74,00,2e,00,65,00,78,00,65,00,\00,00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{77708248-f839-436b-8919-527c410f48b9}]@="Add Registry Editor to Control Panel"- Save the file as .reg (any name you want is fine).
- Right click on the file and select merge.
- A warning box would pop-up reminding you of the dangers of changing the values of the registry.
- Click Yes and you would receive a confirmation that the file has been added to the registry.
- To confirm that your trick has worked, open your control panel and navigate through it. The registry editor app should be visible as in the screenshot below (see encircled option).
To remove the registry editor from the control panel, create another text document on your notepad and add the following codes;
123456789Windows Registry Editor Version 5.00[-HKEY_CLASSES_ROOT\CLSID\{77708248-f839-436b-8919-527c410f48b9}][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{77708248-f839-436b-8919-527c410f48b9}]Then save the file as .reg again, merge it, and re-open your control panel. The registry editor app should have vanished.
Example 2: How to View Last Active Window (Modifying a value)
Sometimes, you may have multiple instances of a program running at the same time, and when you switch to another program entirely and try to switch back to the program (with multiple instances) – it instead gives you a list of all the instances instead of taking you back to the last active one. For instance, if you open 20 instances of Microsoft word, switch to Chrome or Firefox Browser, then try opening the last active Microsoft word window, you would be given a thumbnail containing all the instances of Microsoft word you have opened and you would have to select the last active one again.
The screenshot below is an example of the thumbnails you would face when returning to the application with multiple instances – instead of shooting straight back to the last active instance.
By modifying a few values in the registry editor, you can skip the thumbnail and go straight to the last active Microsoft word window.
To do this, execute the following steps;
- Open the registry editor and follow this route:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced
You should arrive at an interface which looks like this;
- Create a 32-bit DWORD (REG_DWORD)
- Name it LastActiveClick and make its value 1.
- Save it and check for changes, you might have to restart the computer in this case. But if the changes click in automatically, forget about restarting your computer and move on.
In Conclusion, there are quite a lot of hacks you can do on your computer using the Windows Registry. Just be sure to create a backup or a restore point to avoid irreversible damage if an accident should occur. More and more articles would be released regarding the Windows Registry and how to hack your way around it, and each article would make reference to this just in case you are a beginner.
- AuthorPosts
- You must be logged in to reply to this topic.