sodcalculator

10 Tech How-To

Turn Off Display Option in Windows 11 Desktop Menu

Guide 10-16445 · Updated · Step by step

This guide shows you how to add a “Turn off display” option directly to the Windows 11 desktop right-click menu, letting you power off your monitor with a single click instead of using the Start menu or pressing a keyboard shortcut. You’ll need to create a small registry file and merge it—no third-party software required. The process takes about five minutes and works on current versions of Windows 11.

What You’ll Need

  • A Windows 11 PC with administrator access (you’ll need to approve a User Account Control prompt).
  • Notepad (built into Windows) or any text editor.
  • Basic comfort with editing the Windows Registry—you’ll only add a few keys, but it’s important to follow the steps carefully.

Step-by-Step

  1. Open Notepad. Press Win + R, type notepad, and press Enter. Alternatively, search for Notepad in the Start menu.
  2. Create the registry script. Copy and paste the following text exactly into Notepad:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay]
    "MUIVerb"="Turn off display"
    "Icon"="shell32.dll,316"
    "Position"="Bottom"
    
    [HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay\command]
    @="powershell -WindowStyle Hidden -Command \"(Add-Type '[DllImport(\"user32.dll\")] public static extern int SendMessage(int hWnd, int Msg, int wParam, int lParam);' -Name a -Pas) | Out-Null; [a]::SendMessage(0xffff, 0x0112, 0xF170, 2)\""

    Note: The PowerShell command sends a WM_SYSCOMMAND message with SC_MONITORPOWER to turn off the monitor. It works on most desktop and laptop displays.

  3. Save the file. Click File > Save As. In the “Save as type” dropdown, choose All Files (*.*). Name the file TurnOffDisplay.reg (the .reg extension is essential). Choose a location you’ll remember, like your Desktop, and click Save.
  4. Merge the registry file. Navigate to the saved file, right-click it, and select Merge. If prompted by User Account Control, click Yes to allow the change.
  5. Confirm the merge. A dialog will ask if you’re sure you want to continue. Click Yes again. You’ll see a message that the keys and values were added successfully. Click OK.
  6. Test it. Right-click anywhere on your desktop. You should see a new item at the bottom of the context menu: Turn off display. Click it. Your monitor should go black (the PC stays on). Move your mouse or press a key to wake it.

Common Mistakes

  • Incorrect file extension: If you save the file as TurnOffDisplay.reg.txt, it won’t merge. Make sure the file name ends with .reg and that “Hide extensions for known file types” is unchecked in File Explorer options (or you’ll see the .txt and can remove it).
  • Copying the script with line breaks: The command line in the .reg file must be a single line. If Notepad wraps it visually, that’s fine, but ensure there are no actual line breaks within the @= value. Paste it as-is; it’s already formatted correctly.
  • Typing the registry path wrong: The path must be HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay. A typo (like missing a backslash) will cause the merge to fail or add the item in the wrong place.
  • Forgetting to approve UAC: If you click “No” on the User Account Control prompt, the merge won’t happen. Always approve it.
  • Using a 32-bit vs 64-bit PowerShell issue: The command uses PowerShell, which is present on all Windows 11 systems. If you’ve customized your PowerShell execution policy, the command might be blocked—but the default policy allows this script.

Tips

  • Customize the label: Change the text in “MUIVerb” to anything you like, e.g., “Monitor Off” or “Sleep Screen”. Save the file and merge again to update.
  • Change the icon: The Icon value uses shell32.dll,316 (a monitor icon). You can replace it with another icon from shell32.dll (e.g., shell32.dll,20 for a power icon) or point to a custom .ico file.
  • Move the item: The Position value is set to Bottom. You can remove that line to place it near the top, or set it to Top to force it to the very top.
  • Undo the change: To remove the menu item later, delete the registry key HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay using Registry Editor (regedit) or create a .reg file with a minus sign before the key name.
  • Use a keyboard shortcut instead: If you prefer a physical shortcut, you can create a desktop shortcut with the same PowerShell command and assign a hotkey (right-click shortcut > Properties > Shortcut key).

Troubleshooting

The menu item doesn’t appear. First, verify the registry merge succeeded. Open Registry Editor (regedit) and navigate to HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay. If the key is missing, re-merge the file. If it’s there, check that the command subkey exists and contains the @ value with the full PowerShell command. Also, ensure you’re right-clicking on the desktop itself, not on a file or folder.

The item appears but nothing happens when clicked. This usually means the PowerShell command failed silently. Test the command manually: open PowerShell and paste the command from the registry (without the outer quotes) and run it. If it works, the issue is likely a formatting error in the .reg file—re-copy the script exactly. If it doesn’t work, your system may have a policy blocking PowerShell scripts; try running the command with powershell -ExecutionPolicy Bypass instead.

The monitor turns off but immediately wakes. Some mice or keyboards send a wake signal when the monitor goes off. This is a hardware behavior, not a script issue. You can try unplugging the mouse briefly to test, or adjust your power settings in Windows (Settings > System > Power & battery) to reduce wake sensitivity.

After merging, the desktop menu is slow or broken. This is rare, but if the context menu becomes unresponsive, the registry entry might be malformed. Remove the key (see Tips) and restart Explorer (right-click taskbar > Task Manager > Windows Explorer > Restart).

Frequently Asked Questions

Does this work on Windows 10? Yes, the same registry structure works on Windows 10 as well. The steps are identical.

Will this turn off my laptop’s screen too? Yes, it sends the same command that Windows uses when you choose “Turn off display” in power options. It works on both desktop monitors and laptop screens.

Is it safe to edit the registry this way? Adding a new key under HKEY_CLASSES_ROOT is safe as long as you don’t modify existing keys. Always back up your registry before making changes (File > Export in regedit).

Can I make the menu item appear only when I right-click on the desktop, not in folders? Yes, that’s exactly what this does. The key is under DesktopBackground, so it only shows on the desktop.

How do I remove the option after adding it? Delete the registry key HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay using regedit, then restart Explorer. Or create a .reg file with [-HKEY_CLASSES_ROOT\DesktopBackground\Shell\TurnOffDisplay] and merge it.

Will this affect my PC’s sleep settings? No, it only turns off the display. The computer remains fully awake. To put the PC to sleep, you’d need a different command.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →