By Hally | Last Updated
"Apart from adding restart and shutdown to the folder context menu, do you know how to add them directly to the context menu? That is, I want them to show up when I right-click any blank area on the desktop of my Windows 8 computer. And I also want other options including lock, log off, switch users, sleep and hibernate to display in the right-click menu. Is it possible? Looking forward for your positive reply."
To solve the problem above, this article will illustrate how to add lock, log off, switch users, sleep, hibernate, restart and shutdown to context menu (also known as right-click menu) step by step.
Video Guide:
Step 1: Build a new text document.
Right-click any blank space on the desktop, click New and select Text Document.
Step 2: Input related commands in the new text document.
The commands to be input are as follows, and you can copy and paste them to the text document.
Windows Registry Editor Version 5.00
;Created by Vishal Gupta for AskVG.com
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power Menu]
"MUIVerb"="Power Control"
"SubCommands"="lock;logoff;switch;sleep;hibernate;restart;shutdown"
"Icon"="shell32.dll,215"
"Position"="bottom"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock]
@="Lock"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock\command]
@="Rundll32 User32.dll,LockWorkStation"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\logoff]
@="Log off"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\logoff\command]
@="Shutdown -l"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\switch]
@="Switch Users"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\switch\command]
@="tsdiscon.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\sleep]
@="Sleep"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\sleep\command]
@="rundll32.exe powrprof.dll,SetSuspendState Sleep"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hibernate]
@="Hibernate"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hibernate\command]
@="Shutdown -h"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\restart]
@="Restart"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\restart\command]
@="Shutdown -r -f -t 00"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\shutdown]
@="Shutdown"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\shutdown\command]
@="Shutdown -s -f -t 00"
Step 3: Save the text document as a reg file with a specific name.
This step is further divided into the following two procedures.
1. Click File on the Menu Bar and choose Save As to move on.
2. Rename the file and save it as reg file type.
More specifically speaking, you can rename it as add lock, logoff, switch, sleep, hibernate and shutdown to context menu.reg. In other words, the file extension name (.reg) is manually added.
Step 4: Merge the reg file.
Right-tap the reg file and select Merge.
Step 5: Allow the Registry Editor to make changes to the computer.
When the User Account Control window appears, choose Yes.
Step 6: Add the reg file to the registry.
As the Registry Editor dialog box emerges, click Yes to add the reg file to the registry.
Step 7: Finish the whole operation.
When it informs you that the keys and values contained in the reg file have been successfully added to the registry, you can tap OK to complete the whole process.
Now, when you right-click any blank area on the desktop, point to Power Control option and you will find Lock, Log off, Switch Users, Sleep, Hibernate, Restart and Shutdown are triumphantly added to the context menu.
Related Articles: