Windows Registry Hacks
REGISTRY STRUCTURE
When you first open the Registry Editor, you will see that the Windows Registry is broken down into a five main folders, also known as Hives or Root Keys:
- HKEY_CLASSES_ROOT
- HKEY_CURRENT_USER
- HKEY_LOCAL_MACHINE
- HKEY_USERS
- HKEY_CURRENT_CONFIG
How to Backup and Restore Windows Registry
Before you try out the hacks, learn how to backup and restore Windows registry.
When you invoke the Export function from "File --> Export", you are given a choice of different file types that can be saved :
- Registration Files (*.reg)
- Registry Hive Files (*.*)
- Text Files (*.txt)
If you export the registry as a Registration File with an REG file extension you can restore this backup by double clicking on it. Exporting to hive files is my choice most of the time. There is a undesirable disadvantage when you backup registry as Registration File reason is that the Registration File backup does not delete values or keys that has been created after you export registry as a Registration File backup it will only restores what has been backup but if you export registry as a hive file its much more accurate than either type of REG file. They are the same format as the Windows OS working hive files, so they represent settings exactly the same way. Also, when you import a hive file, Registry Editor deletes the branch it's replacing before importing the settings. In other words, the editor removes any settings that exist in the working registry but not in the hive file you're importing. When restoring keys from a backup after an unsuccessful registry edit, this is exactly the behavior you want. Their only drawback is you can't view them in Notepad.
Backup Registry
Before making any changes in registry you should backup the register key settings.
From registry editor select the registry key which you want to backup and from menu bar click File --> Export select a location where you want to backup registry and give the registry backup a file name.
When you backup the registry as a hive files without file extension and then to undo the changes you have made in registry click File --> Import from menu bar and select the registry backup file.
Open registry editor by pressing keys together to launch RUN dialog box.
Type regedit.exe into RUN dialog box and press Enter. It will open the Registry Editor.
Youd may have to manually create some of the missing registry keys and values.
.
Automatic Termination Of Processes At Shut Down
Forces user processes to end automatically when the user logs off or shuts down
Registry key: HKEY_USERS\.DEFAULT\Control Panel\Desktop Value Name: AutoEndTasks Data Type: REG_SZ (String Value) Value Data: (0 = disabled, 1 = enabled)
Modify the value data of the AutoEndTasks value to equal 1 to automatically end tasks or '0' to prompt for action.
This change will affect all users but the value can also be changed on a user-by-user basis by modifying [HKEY_CURRENT_USER\Control Panel\Desktop] with the same values.
Change the Location of Special Folders
Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Note the current location of the folder you want to move, and then using explorer move the folder to the new location. Edit the value in the key above for the folder you moved to reflect the new directory location. Log off or restart Windows for the changes to take effect.
Customize the Windows Logon and Security Dialog Title
Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon Value Name: Welcome Data Type: REG_SZ (String Value) Value Data: Text to display
Create a new String value, or modify the existing value, called Welcome and edit the value according to the settings below. Exit your registry, you may need to restart or log out of Windows for the change to take effect.
Legal Notice Dialog Box Before Logon
Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon Value Name: LegalNoticeCaption
Modify the value named LegalNoticeCaption to represent the caption on the dialog box (e.g. 'WARNING!'). If this value doesn't already exist create it. Modify the value named LegalNoticeText to represent the body of the dialog box (e.g. 'Do Not Attempt to Logon to this system unless you are an authorized user!'). Exit your registry and restart Windows, and the next time you boot up you should be presented with the dialog box before logging on.
Disable Show Last User Name
Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System Value Name: dontdisplaylastusername Data Type: REG_DWORD (DWORD Value) Value Data: (1 = remove username)
Create a new DWORD value, or modify the existing value, called dontdisplaylastusername and edit the value according to the settings above. Exit your registry, you may need to restart or log out of Windows for the change to take effect.
Startup A Program Just Once Then Delete From The Registry
Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce Data Type: REG_SZ Value Data: Path to the program
Startup Programs Without The Startup Folder
Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run Data Type: REG_SZ Value Data: path to program
Accelerate Termination Of Processes/Services At Shut Down
Lowers the time the system waits for user processes to end when the user logs off or shuts down from 20000 to 2000 (milliseconds)
Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control Value Name: WaitToKillServiceTimeout Data Type: REG_SZ Value Data: <In milli-seconds; default is 20,000>
Try not to increase the shut-down time. For example, if you lose power, it is possible that your uninterruptible power supply cannot provide backup power for the computer long enough to allow all the services to shut down properly, as well as the operation system.
Type in a number between 2000-20000 (2-20 seconds), and click on OK.
Speed Up Menu Display
Registry key:HKEY_CURRENT_USER\Control Panel\Desktop Value Name: MenuShowDelay Data Type: REG_SZ Value Data: 100
Restart Windows for the changes to take effect.
Restrict Users from Running Specific Applications
Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer Value Name: DisallowRun
Create a new DWORD value and name it DisallowRun set the value to 1 to enable application restrictions or 0 to allow all applications to run. Then create a new sub-key called DisallowRun :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun
And define the applications that are to be restricted. Creating a new string value for each application, named as consecutive numbers, and setting the value to the file name to be restricted (e.g. "regedit.exe"). Restart Windows for the changes to take effect.
Restrict Applications Users Can Run
Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer Value Name: RestrictRun
Create a new DWORD value and name it RestrictRun set the value to 1 to enable application restrictions or 0 to allow all applications to run. Then create a new sub-key called RestrictRun:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun
And define the applications that are allowed. Creating a new string value for each application, named as consecutive numbers, and setting the value to the file name to be allowed (e.g. "regedit.exe"). Restart Windows for the changes to take effect.
Change Windows Taskbar Preview Time for Improved Performance
Registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion Value Name: ExtendedUIHoverTime Data Type: DWORD
Pick a value. The decimal figures correspond to milliseconds, and by default, Windows presents the options at 400 milliseconds. Thats close to half a second of waiting. The value that you choose is uniquely personal, but 100 and 50 in particular give a very visible speed boost without making the previews appear instantly. .
Restart Windows for the changes to take effect.
Disable the Lock Screen in Windows 8, 8.1 and 10
Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalisation Value Name: NoLockScreen Data Type: DWORD Value Data: 1
After your done next reboot, the lock screen will be gone. If you want to re-enable it, just change the registry setting from 1 to 0.
Create a Right-Click Command Prompt Option
You can right-click a folder to get a list of actions you can apply to it. Here is a way to create an action on that right-click context menu that opens a Command Prompt window with that folder as the current directory. In a text editor such as Notepad, copy/paste the following exactly:
Save the file with any name you want, with a .reg extension. Then double-click the saved file and choose Yes to merge the registry file information into the Registry. Right-click any folder and you'll see the "Open Administrator Command Prompt Here" option.
Changing the Recycle Bin Icon
To change the icon identifying the recycle bin, click [+] near the {645FF0405081101B9F0800AA002F954E} key. You can search for this key from the "Edit --> Find.." at menu bar.
Open the DefaultIcon subkey residing under this key.
The right pane will contain the following three value entries: (Default), Empty, and Full. The data column will contain the appropriate DLL ("SHELL32.DLL, no") that contains the icon. The no parameter represents the icon number with the file.
The Empty and Full icons are numbered 31 and 32, respectively. The Shell32.dll file contains alternative versions of the Full icon (in positions ranging from 49 to 51). Select any icon and set the value according to your preferences.
Removing Shortcut Arrows from Windows Shortcuts
To get rid of the arrows that appear on the Windows shortcut icons, the following steps need to be taken:
HKEY_CLASSES_ROOT\lnkfile
Delete the lsShortcut value.
Find the HKEY_CLASSES_ROOT\piffile key.
Delete the lsShortcut value.
Restart Windows OS. The shortcuts will now be displayed without the arrows.
Tweaking Default Color Scheme
If you are tired of the default color scheme on the logon and logoff screens you can change it just like you can change the rest of the new interface. The Windows logon process determines which color scheme to display by reading a value in the registry. Microsoft did not write a GUI to make it easy for you to change the settings, but you can do it within Registry Editor.
Registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent Value Name: DefaultColorSet Data Type: DWORD (32-bit)
Value Data: Enter the corresponding value between 0 and 24 for the color scheme
Stop Windows Update from Hijacking the Shutdown Button
With Windows 7 or Vistas habit of changing the Shutdown button into an Install Updates and Shut Down button whenever there are updates from Windows Update.
Registry key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsUpdate\AU Value Name: NoAUAsDefaultShutdownOption Data Type: DWORD (32-bit) Value Data: 1
Taking Ownership Of System Files Or Folders
Taking ownership of system files or folders in Windows is not a simple task. This method works in Windows Vista, 7, 8, 8.1, and 10, and it maybe works in XP, though you wont need it there.
In a text editor such as Notepad, copy/paste the following exactly:
Save the file with any name you want, with a .reg extension. Then double-click the saved file and choose Yes to merge the registry file information into the Registry. You will see context menu option named Take Ownership when you right-click file or a folder.
Copy to Folder and Move to Folder Menu
This will add the Copy To and Move To options to the right click menu.
In a text editor such as Notepad, copy/paste the following exactly:
Save the file with any name you want, with a .reg extension. Then double-click the saved file and choose Yes to merge the registry file information into the Registry.
Disable_Windows_Defender_Real-Time_Protection
In a text editor such as Notepad, copy/paste the following exactly:
Save the file with any name you want, with a .reg extension. Then double-click the saved file and choose Yes to merge the registry file information into the Registry.
Tcp1323Opts
Tcp1323Opts lets you use RFC 1323, known as TCP Extensions for High Performance, in 3 ways. This particular value works with timestamping and network window scaling. This allows the TCP connection to negotiate a receive window size with a server, letting computers specify receive windows of up to 1 GB. This means that youll be able to receive up to 1 GB at a time through a connection. Of course, such a high number is unrealistic in todays standards, but we have the possibility when we need it. The option youre editing is a two-bit value (no pun intended). The lower bit specifies whether you want to use window scaling, and the higher bit specifies whether you want to use timestamps.
Windows sets this value to 3 by default. Youre going to create the value in the registry and set it to 1.
Navigate to the following location in your registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Add TCP1323Opts as a REG_DWORD data type value on the right-hand side of the registry editor once you reach the path in the registry. Modify this value to 1.
MaxFreeTcbs
MaxFreeTcbs is an iffy value. It determines how many active TCP connections your computer can handle at any given time based on how much physical memory you have and how much performance your computer has bandwidth-wise. If the number is too high, your computer might not properly process TCP transactions because of the high amount of active connections talking to the computer at the same time. However, if the number is too low, you cant host or request as many connections as you like. While the setting is arbitrarily determined, you might want to bump up the number when you upgrade your hardware or Internet connection.
Often times, your computer will perform best with a MaxFreeTcbs number of 65536, although you should still limit the amount of connections your computer has on applications that host and request several simultaneous connections, such as uTorrent.
To reach the location for the value, go to the following path in your registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Create or edit MaxFreeTcbs as a REG_DWORD data type value and place its value at 65536. If you're using an older computer with lower-performance hardware, you can set this at a lower number, like 16000.
MaxUserPort
When an application requests an available port to open from Windows, the operating system chooses one port from 1024 to a specified maximum known as MaxUserPort. A port on your computer allows you to establish TCP/UDP connections through the Internet and in your local network. I could get into more detail, but we really should get moving. Well, we all know that 5000 is less than 65534. What happens when you open more options to programs seeking a port? They find a port much faster than they would with only a couple thousand available choices.
Windows sets this value to 5000 by default, but you can set it up for any number from 5000 to 65534.
The location where MaxUserPort must go is in the following registry path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Create a value named MaxUserPort REG_DWORD data type value and set it to 65534. That's it!
GlobalMaxTcpWindowSize
This value has a long name, but you wont regret modifying it if you have a big Internet connection (10 Mbps and up) and upload stuff a lot. This value represents how much data can be sent from your computer without receiving an acknowledgement (ACK) packet. Every time you send small chunks of data on the Internet, your computer has to wait for this packet, which tells your end of the network, Everything OK! Send more! Sometimes, due to latency and poor peering, this might not be ideal. So, you can edit this value to allow more data to be sent without waiting for that packet to come.
Create a value named GlobalMaxTcpWindowSize REG_DWORD data type value in the following registry path, on the right side of the window.:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameter
Set the value to 65535 and youre done! This will make the computer able to send 64 kilobytes without waiting for acknowledgement. If you feel a drop in speed after modifying this, either remove the value or try raising it slightly, to 128 kilobytes (by setting the value to 131072).
Network
The Network category always appears, even if you are not on a home or work network. To remove the Network item from the Navigation Pane, go to the following location in the Registry:
HKEY_CLASSES_ROOT\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\ShellFolder
Right-click on the subfolder above, and if necessary change the permission to allow you to edit it.
PinToNameSpaceTree
Right-click on the value shown above and delete it. Restart Windows, or logoff and logon, and the Network category will no longer be visible in the Navigation Pane. To undo this change at any time, simply go to the subfolder above, right-click in the right pane, create a new STRING with no value data and name it PinToNameSpaceTree then restart Windows or logoff and logon.
Manage Context Menu Entries
The utilities like ShellExView and ShellMenuView are recommended for most users as they are automated and provide safeguards to more easily undo changes. However if you wish to manually (and hence permanently) remove the context menu entries directly in the Windows Registry, look under the following locations using the Registry Editor:
[HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers] [HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers] [HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers] [HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers] [HKEY_CLASSES_ROOT\Drive\shell] [HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers] [HKEY_CLASSES_ROOT\Folder\shell] [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers]
The subfolders above are locations which hold most context menu entries in Windows. Under each, aside from standard Windows items such as Sharing or Offline Files, you may find keys or values which relate to particular third party programs. Right-clicking on the relevant program key and selecting Delete will remove its context menu entries. In most cases as you remove unwanted program entries, you can test the effects immediately by checking to see if the relevant entry was removed from the context menu. In some cases - mainly with shell extensions - you may need to reboot to see the effects. There is no undo function in Registry Editor, so make sure to back up the relevant branch before editing it.
EDIT 'OPEN WITH' CONTEXT MENU
Whenever you open a particular type of file with a program, it will usually be added to the 'Open With' context menu for that file type. To edit the programs which are included in this list for a particular file extension, first open the following location in the Registry:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts]
You can select the relevant file extension from the list of subfolders shown when you expand FileExts.
Once you have found the extension for the file type that you wish to change the 'Open With' context menu entry, expand it and underneath you will typically find an OpenWithList and/or OpenWithProgids keys.
In general, entries under OpenWithProgids can be deleted, but the default handler is typically a Windows specific command that should not be deleted.
In most cases where there is a list of entries shown in the 'Open With' context menu, you can delete unwanted entries by going to the OpenWithList key for that extension. For example, to edit the 'Open With' context menu list for the .JPG image file extension, go to the .jpg key here, then select the OpenWithList key under it, and in the right pane you should see a list of STRING entries, such as the ones below:
a=PhotoViewer.dll
b=mspaint.exe
c=iexplore.exe
Each value corresponds with a particular program which is shown as an entry in the 'Open With' context menu for that particular file extension. Right-click on value(s) for the program(s) you wish to remove and select Delete, and they will be immediately removed from the relevant 'Open With' context menu.
EDIT 'NEW' CONTEXT MENU
If right-clicking on a blank area in File Explorer, the New option appears in the context menu, and when selected, shows a range of programs for which you can create a new file. By default, certain Windows entries such as 'Text Document' appear here, which creates a new blank .TXT file if selected. However there are other entries here automatically added by various programs which may be undesirable, and which can be removed.
To remove any of these entries, first create a new file for the relevant program and look at its file extension.
Then go to the [HKEY_CLASSES ROOT] folder in the Registry, expand it and look for that same file extension.
For example, the 'Microsoft Word Document' New context menu entry creates a blank new .DOCX file when selected, so in the Registry go to:
[HKEY_CLASSES_ROOT\.docx]
Then expand the .docx subfolder and keep expanding any subfolders until you find the ShellNew key (in this case, [HKEY_CLASSES_ROOT\.docx\Word.Document.12\ShellNew]). Right-click on ShellNew and delete it to remove 'Microsoft Word Document' from the list of programs shown under the New context menu. You can view the results immediately without needing to reboot, so check to see if the desired entry has been removed, and repeat the process as many times as required until all unnecessary program entries have been removed from the New context menu.
Alternatively, if you want to add a program to the New context menu, go to the [HKEY_CLASSES ROOT] folder in the Registry, right-click on the relevant file extension and select New --> Key, and name this new key ShellNew. Left-click on ShellNew and in the right pane of Registry Editor, right-click in an empty area and select New --> String Value, and call it NullFile - it doesn't need any value assigned to it. A new entry will now be added to your New context menu for that particular program/file extension, and when selected, it will create a blank new default file with the relevant extension.
ADD 'OPEN WITH NOTEPAD' CONTEXT MENU ITEM
If you want to quickly open any file using Notepad, you can add a new 'Open with Notepad' context menu item by going to the following location in the Registry:
[HKEY_CLASSES_ROOT\*\shell\]
Right-click on the subfolder above, select New --> Key and call it Open with Notepad. Then right-click on this new key, select New>Key again to create a new key under it called command, with the final result looking like this:
[HKEY_CLASSES_ROOT\*\shell\Open with Notepad\command]
Select the command subfolder and in the right pane, double-click on the (Default) entry and enter the following value data exactly as shown:
notepad.exe %1
Now whenever you right-click on any file it will have a new context menu entry called 'Open with Notepad', which when selected opens that file instantly in Notepad, making text editing much easier. To remove this context menu entry simply delete the Open with Notepad subfolder in Registry Editor.
FIX CHANGING FOLDER VIEWS
This is an issue which first came to prominence in Windows Vista, and can still occur in Windows 7 and 8,8.1 and Windows 10 although it is unlikely if you set your folder views correctly. If your folder views in Explorer-based interfaces are constantly being changed or shown incorrectly, then follow these instructions to fix this issue permanently.
Go to the following location in the Windows Registry:
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\ Windows\Shell\Bags] [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\ Windows\Shell\BagMRU]
Right-click on the Bags subfolder in the left pane and select Delete, then do the same thing for BagMRU. This will remove most existing customizations for things like window sizes, positions and views. While still in the same place in the Registry Editor, you will need to manually recreate one of these keys with a new setting.
Right-click on the following subfolder in the left pane:
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]
Create a new key called Bags to replace the one you just deleted. Right-click on Bags, select New>Key and name this new key AllFolders. Right-click on AllFolders, select New --> Key and name this new key Shell. The end result should look like this in Registry Editor:
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
Now left-click on the last Shell key and in the right pane right-click in an empty area and select New --> String Value. Name this new value FolderType and once created, double-click on it and in the Value Data box enter NotSpecified.
These steps will reset your folder views such that they can be customized again but this time without being changed once you've adjusted them.
There is one last step which can help ensure these settings remain fixed: increasing the number of customized folder views Windows can hold. To do this, go to the following location in the Registry:
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]
Left-click on the Shell key and in the right pane, if you can see BagMRU Size then there is no need to undertake this step. If it isn't there however, right-click and select New --> DWORD 32-bit Value and name it BagMRU Size. Now set this value to 10000 in Decimal view.
The above steps should ensure that your folder views are reset, and once adjusted by you, don't change again unless you change them manually. If you still find your folder views resetting or changing every once in a while, even after following the steps above, it indicates that you may have data corruption issues , or a particular program you have installed is constantly interfering with Explorer-based views in the Windows Desktop interface.
Edited by FreeBooter, 14 June 2016 - 12:11 PM.