Windows

How to Disable and Enable Registry Access on Windows 11

How to Disable and Enable Registry Access on Windows 11
How to Disable and Enable Registry Access on Windows 11

The Windows Registry is a critical database that stores configuration settings for the operating system, hardware, and installed applications. Making incorrect changes to the Registry can have severe consequences, leading to irreversible damage to your system. Therefore, it’s essential to exercise caution when accessing and modifying the Registry. In this guide, we will explore two methods for how to Disable and Enable Registry Access on Windows 11 using the Local Group Policy Editor and the Registry Editor. Please see How to search through the Windows registry, how to display Windows system information via the Windows registry, and how to block upgrades to Windows 11 through Local Group Policy or Registry Editor from Windows 10.

Note: Editing the Registry can be risky, so it's crucial to back up your PC before proceeding.

Here are other related guides on Windows Registry: How to add and modify the Windows Registry from the Command Prompt, How to add Registry keys via DISM in Windows,  How to Get, Edit, Create and Delete Registry Keys via PowerShell in WindowsSmart App Control and how to enable Phishing Protection: Windows 11 New Security Features, and How to enable or disable Core Isolation Memory Integrity in Windows 10 and 11.

Method 1: Disable Windows Registry Access through the Local Group Policy Editor

The Local Group Policy Editor is available in Windows 11 Pro, Enterprise, and Education editions. Follow these steps to block Registry access:

Press “Windows + R” key together to open Run, type “gpedit.msc” and hit Enter to launch the Local Group Policy Editor.

Run utility
Run utility

Navigate to the following path :

User Configuration > Administrative Templates > System

Double-click on the “Prevent access to registry editing tools” policy on the right side.

Navigate to Prevent access to registry editing tool in the Local Group Policy Editor
Navigate to Prevent access to registry editing tool in the Local Group Policy Editor

In the policy settings, select “Enabled.” Under the “Options” section, choose “Yes” to prevent users from editing the Registry using the “regedit /s” command.

Enable Prevent Access to Registry Editing tool
Enable Prevent Access to Registry Editing tool

Click “Apply” and then “OK” to save the changes. Restart your system for the configuration to take effect.

Please see How to set Desktop Wallpaper, Prevent access to Registry Editing tools, enable Screen Saver Timeout, and Password Protect the Screensaver via Group Policy, and how to Check if Windows Updates were installed on your device via the Registry Editor.

How to Re-enable Registry Access

Press “Windows + R” key together to open Run, type “gpedit.msc” and hit Enter to launch the Local Group Policy Editor.

Run utility
Run utility

Navigate to the following path :

User Configuration > Administrative Templates > System

Double-click on the “Prevent access to registry editing tools” policy.

Navigate to Prevent access to registry editing tool in the Local Group Policy Editor
Navigate to Prevent access to registry editing tool in the Local Group Policy Editor

Select “Not configured.”

Set Prevent Access to Registry Editing tool to Not Configured
Set Prevent Access to Registry Editing tool to Not Configured

Click “Apply” and then “OK.”

Method 2: Restrict Registry Access through the Registry Editor

If you are using Windows 11 Home edition, you can restrict Registry access using the Registry Editor. Keep in mind that you will need to repeat the steps for each user account. Here’s how:

Open the Registry Editor (RegEdit.exe) by searching for it in the Start menu.

Open Registry Editor
Open Registry Editor

Navigate to the following path:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies

Right-click on the “Policies” key, select “New,” and click on “Key.” Name the key “System” and press Enter.

Create System key in Policies
Create System key in Policies

Right-click on the newly created “System” key, select “New,” and click on “DWORD (32-bit) Value.” Name the key “DisableRegistryTools” and press Enter.

Create DWORD in the System key
Create DWORD in the System key

Double-click the “DisableRegistryTools” DWORD and set its value to “1” to block Registry access.

Change the DWORD value data
Change the DWORD value data

Close the Registry Editor. The new setting will take effect immediately for the respective user account.

Registry editing disabled
Registry editing disabled

Now, when a user try accessing the Registry Editor it displays a message saying “Registry editing has been disabled by your administrator.”

How To Re-enable Registry Access Using Command Prompt (Permit Registry Access)

Since you won’t be able to launch the Registry Editor, follow these steps:

Open the Start menu, search for “Notepad” and open the app.

Open Notepad
Open Notepad

Copy and paste the following content into Notepad:

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "DisableRegistryTools"=dword:00000000
Enter the Registry entries
Enter the Registry entries

Save the file with a descriptive name, such as “reenable_registry.reg.”

Save the registry entries
Save the registry entries

Open the Start menu, search for “Command Prompt,” right-click on the result, and select “Run as administrator.”

Open Command Prompt
Open Command Prompt

Use the “cd” command to navigate to the folder where the “.reg” file is located.

Execute the following command to re-enable Registry access:

regedit.exe /s reenable_registry.reg
Reenable Registry editing
Reenable Registry editing

After executing the command, restart your system. You will regain access to the Registry as an admin once the system reboots.

Enabling Registry Editor using UnHookExec.inf from Symantec

To enable the Registry Editor and remove restrictions on modifying registry keys, you can use the UnHookExec.inf file provided by Symantec. This small .inf file is designed to address the issue of viruses, spyware, trojans, or worms that often target the shell\open\command keys, allowing them to execute each time a specific file type is opened. Typically, these malicious programs associate their execution with .exe files. However, by using UnHookExec.inf, you can not only enable Registry editing but also remove such associations.

To use UnHookExec.inf, follow these steps:

Open Notepad and copy the code provided below:

[Version]
Signature="$Chicago$"
Provider=Symantec

[DefaultInstall]
AddReg=UnhookRegKey

[UnhookRegKey]
HKLM, Software\CLASSES\batfile\shell\open\command,,,"""%1"" %*"
HKLM, Software\CLASSES\comfile\shell\open\command,,,"""%1"" %*"
HKLM, Software\CLASSES\exefile\shell\open\command,,,"""%1"" %*"
HKLM, Software\CLASSES\piffile\shell\open\command,,,"""%1"" %*"
HKLM, Software\CLASSES\regfile\shell\open\command,,,"regedit.exe ""%1"""
HKLM, Software\CLASSES\scrfile\shell\open\command,,,"""%1"" %*"
HKCU, Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableRegistryTools,0x00000020,0

Save the file as UnHookExec.inf (you can choose any name, but make sure it has the .inf extension).

Copy and paste the UnHookExec code
Copy and paste the UnHookExec code

Right-click on the UnHookExec.inf file and select “Install.” Please note that installing the file will not display any pop-ups or notice boxes.

Install the UnHookExec file
Install the UnHookExec file

Registry Editor will be immediately accusable. If it is not, restart your PC.

Conclusion

By following these steps, you can effectively control and manage Registry access on your Windows 11 system, ensuring the security and stability of your operating environment. Remember to exercise caution and always back up your system before making any changes to the Registry.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x