Don’t Be Afraid To Edit Your Registry
In many tech troubleshooting articles you’ll find a way to fix a problem that involves “editing the Windows registry.” There’s always a dire warning attached, along the lines of, “Do not attempt to edit the registry unless you know what you’re doing! One wrong registry edit can render your machine unusable!” That's true, but with a bit of caution, you can safely edit the registry. Here's what you need to know...
What is the Windows Registry?
It's always good to start with a definition. I like to call the Windows registry "a hideously complex ball of string, rubber bands, duct tape and bailing wire that's supposed to keep track of Windows system settings, your hardware configuration, user preferences, file associations, system policies, and installed software." It was intended to be an improvement on the simple text-based INI files that stored Windows configuration settings, but apparently too many pocket protectors were involved in the design.
One advantage of the registry is that it enables each user of a machine to maintain his/her own settings; each user can have a unique theme, speaker volume setting, set of apps, and so on. But the registry can also apply settings to all users, or a group of users specified by the system administrator (e. g., “adults” and “kids”). The registry is one of the most important files on your hard drive.
It may be necessary to edit the registry to correct an error or corruption; to add a setting that is not part of the original design; or to prevent some system activity that is undesired. The registry is a very powerful tool, and if it’s used incorrectly, YES, it can wreak havoc on your system. But with a basic understanding of how it works, and some simple precautions, you need not fear.
The first rule of editing the registry is, “backup your registry!” You can make a backup of your registry by creating a System Restore point. To do so, click Start, type restore point, press Enter, and follow the prompts. Another method is to use the Export function in the Regedit utility. (See below)
Even if your Windows installation becomes unbootable, you can recover your old, working registry using the tools on the System Recovery USB drive that you created. If you have not created one yet, here is a link to how to do it.
Regedit.exe is an app included with Windows to help you edit the registry, Find regedit using the Windows Start search box, then run it to open the registry file. The open regedit window will look something like the screen shot below:
A few paragraphs earlier, I mentioned that you can make a backup of the registry by using the registry editor. Let's do that now. Click File, then Export. In the lower left corner of the new window that opens, select "All" under Export Range. Enter a filename, and click the Save button. It will take a minute or so to create the backup. Don't be surprised if the lights flicker, or if you hear a deep, guttural moan emanating from your computer.
Returning to the registry editor window, at the top left corner we see link containing the word “Computer” -- think of that word as the trunk of a tree. Beneath it, in the left-hand window pane, we see the names of five branches: HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, etc. Click on any of these brahch names (called “keys”) to see what further branches lie below it. Keys can be nested up to 512 levels deep. We won’t be going that far!
The prefix “HKEY” indicates a registry “hive,” the top level of this hierarchical database. “CLASSES_ROOT,” “CURRENT_USER,” etc., are names for hives, each of which contains more levels of data that are all logically connected to the hive’s subject. “HKEY_CURRENT_USER” is a hive that contains settings which apply to whoever is currently logged in to the computer. If you click on that hive name to expand the tree below it, you will see familiar names like “Control Panel,” “Printers,” etc., along with mysterious labels of system resources that most users don’t need to know about.
What you do need to know is that it is critically important to make edits in the correct hive and the correct sub-branch of that hive. A change to HKEY_USERS instead of HKEY_CURRENT_USER may have unintended consequences for all users of a machine, not just you. Navigating the tree structure of the registry must be done with the utmost care.
Fortunately, there are lots of helpful geeks who provide exactly the right paths to take you where you need to be in the registry. In my articles, you will find instructions such as “navigate to \HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows…” Just highlight the path name, copy it, and paste it into the address bar at the top of the regedit window.
Once you are in the right place, most registry tweaks involve enabling or disabling something. The “something” may have a key at the end of a registry path like the one above, or you may need to create one for it. The instructions provided by your friendly geek should tell you what to do, step by step. For example, here is how to make OneDrive disappear from File Explorer’s sidebar in Windows 10:
Copy the following line, press Ctrl+F, paste it into the search box, then hit Enter:
In the right-hand window, you will see a DWORD named, “System.IsPinnedToNameSpaceTree” (you may need to expand the “Name” column to read the whole name). Its value is set to 1 by default, meaning OneDrive in the sidebar is “on.” Double-click on that DWORD name and change the “Value data” to zero (0), then click OK. Close regedit, reboot, and OneDrive will be gone. If you ever want it back, repeat this procedure and change the zero back to a one.
It's also possible to make changes to the registry with a REG file that someone else has coded for a specific task. For example, you can add a new option "Open with Notepad" to the context menu that appears when you right-click on a filename. This is handy when you want to quickly edit a file that doesn't end with the .TXT extension.
Download this ZIP file file, click to open it, and then double-click on the Open-With-Notepad.reg file. Click your way through a few "Do you really want to do this?" prompts, and it will add a key to your registry. Now you can open any file (regardless of the extension) with the Notepad editor, using the context (right-click) menu.
So now you (sort of) know what you are doing in the registry. Just make sure you always start by backing up your existing registry, even if you don’t plan to change anything but are “just looking around.”
Your thoughts on this topic are welcome. Post your comment or question below...
This article was posted by Bob Rankin on 21 May 2018
|For Fun: Buy Bob a Snickers.|
Are Premium Malware Suites Worth Their Price?
The Top Twenty
Is Low Memory Slowing Down Your Computer?
Post your Comments, Questions or Suggestions
Free Tech Support -- Ask Bob Rankin
Subscribe to AskBobRankin Updates: Free Newsletter
Copyright © 2005 - Bob Rankin - All Rights Reserved
Article information: AskBobRankin -- Don’t Be Afraid To Edit Your Registry (Posted: 21 May 2018)
Copyright © 2005 - Bob Rankin - All Rights Reserved