ARMAGEDDON POP

Music Philosophy Art Math Chess Programming and much more ...

March
7
Friday
2025
2025 03 07

Restore Classic Right-Click Menu in Windows 11



Copy this code and run it as a .bat i.e "fixwin11.bat" in the command prompt.

@echo off
title Restore Classic Right-Click Menu in Windows 11
color 0A
echo ==============================
echo   Windows 11 Right-Click Menu Fix
echo ==============================
echo [1] Enable classic right-click menu
echo [2] Restore Windows 11 default menu
echo [3] Exit
echo ==============================
choice /C 123 /N /M "Choose an option: "

if errorlevel 3 exit
if errorlevel 2 goto restore
if errorlevel 1 goto enable

:enable
echo Enabling classic right-click menu...
reg add "HKEY_CURRENT_USER\Software\Classes\CLSID\{86CA1AA0-34AA-4E8B-A509-50C905BAE2A2}\InprocServer32" /f /ve
goto restart_explorer

:restore
echo Restoring Windows 11 default menu...
reg delete "HKEY_CURRENT_USER\Software\Classes\CLSID\{86CA1AA0-34AA-4E8B-A509-50C905BAE2A2}" /f
goto restart_explorer

:restart_explorer
echo Restarting Explorer...
taskkill /f /im explorer.exe
start explorer.exe
echo Done!
pause
exit




Command Breakdown:

1. @echo off

  • This disables the command echoing, preventing the script from displaying each executed command in the console. It keeps the output clean.

2. title Restore Classic Right-Click Menu in Windows 11

  • Sets the title of the Command Prompt window to "Restore Classic Right-Click Menu in Windows 11".

3. color 0A

  • Sets the console color:
    • 0 = Black background
    • A = Light green text

4. echo ==============================

  • Prints a horizontal separator line to enhance readability.

5. echo [1] Enable classic right-click menu

  • Displays a menu with numbered options for the user.

6. choice /C 123 /N /M "Choose an option: "

  • Prompts the user to choose an option from 1, 2, or 3.
    • /C 123 → Specifies the available choices (1, 2, or 3).
    • /N → Hides the default [Y/N]? prompt.
    • /M → Displays the message "Choose an option: ".

7. if errorlevel 3 exit

  • Checks if the user pressed 3, and if so, exits the script.

8. if errorlevel 2 goto restore

  • If the user pressed 2, it jumps to the :restore section of the script.

9. if errorlevel 1 goto enable

  • If the user pressed 1, it jumps to the :enable section of the script.

Enable Classic Right-Click Menu (:enable)

10. reg add "HKEY_CURRENT_USER\Software\Classes\CLSID\{86CA1AA0-34AA-4E8B-A509-50C905BAE2A2}\InprocServer32" /f /ve

  • Adds a new registry entry to enable the classic right-click menu.

    • reg add → Adds a new registry entry.
    • "HKEY_CURRENT_USER\Software\Classes\CLSID\{...}\InprocServer32" → The registry path being modified.
    • /f → Forces the modification without prompting for confirmation.
    • /ve → Sets the "(Default)" value entry to an empty string (which enables the classic menu).
  • After this, the script proceeds to restart Windows Explorer.


Restore Windows 11 Default Right-Click Menu (:restore)

11. reg delete "HKEY_CURRENT_USER\Software\Classes\CLSID\{86CA1AA0-34AA-4E8B-A509-50C905BAE2A2}" /f

  • Deletes the registry key to restore Windows 11’s default right-click menu.

    • reg delete → Deletes a registry key.
    • "HKEY_CURRENT_USER\Software\Classes\CLSID\{...}" → The registry path to be removed.
    • /f → Forces deletion without confirmation.
  • After this, the script also proceeds to restart Windows Explorer.


Restarting Windows Explorer (:restart_explorer)

12. taskkill /f /im explorer.exe

  • Kills (closes) Windows Explorer to apply the registry changes.
    • taskkill → Terminates a running process.
    • /f → Forces termination without confirmation.
    • /im explorer.exe → Specifies the process name (explorer.exe) to be terminated.

13. start explorer.exe

  • Restarts Windows Explorer to reload the updated settings.

14. echo Done!

  • Displays a confirmation message.

15. pause

  • Waits for user input before closing the command window.
  • This allows the user to see the output before the script exits.

16. exit

  • Closes the script.