Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Restart - Add to Desktop Context Menu

14 Aug 2013   #10
Stephanie

Win 7 Pro x64, Win 10 Pro x64, Linux Light x86
 
 

Works perfect, Thank you Shawn


My System SpecsSystem Spec
.
14 Aug 2013   #11
Brink

64-bit Windows 10 Pro
 
 

You're welcome Stephanie. Glad it could help.
My System SpecsSystem Spec
05 Nov 2013   #12
TomHartwald

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by derekimo View Post
Just wondering Shawn, is there a way to have these (shutdown, restart, logoff) context menu items not flash the cmd window like you can on the shortcuts by changing them to open minimized?
Quote   Quote: Originally Posted by Brink View Post
Hello Derek,

You could, but it would involve changing the "command" entry below in the REG file for the context menu to run a BAT or VBS script file instead. The BAT or VBS file would have to be downloaded and saved somewhere as well.

Code:
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Restart Computer\command]
@="shutdown.exe -r -t 00 -f"
I just went with the easier way of doing it instead.

Maybe I'm a little oversensitive (cause it really doesn't matter if something pops up 0.5 sec before
the screen goes down for reboot), but I have NirCmd in my system folder, so I use it to do the job :

Code:
Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; http://www.sevenforums.com
; Tutorial: http://www.sevenforums.com/tutorials/184033-restart-add-desktop-context-menu.html

; Modified by Tom Hartwald to use NirCmd for Reboot (2013-11-05)

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Restart Computer]
"icon"="shell32.dll,-290"
"Position"="Bottom"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Restart Computer\command]
@="nircmd.exe exitwin reboot"
Note: Only the original line below "command" is exchanged with the new one.

You need the NirCmd - Windows command line tool
in your "C:\Windows\System32" folder, it's described for example here in the Forum :
Eject and Close CD/DVD Tray - Add to Desktop Context Menu


@ derekimo :
You can use NirCmd for your requests:

nircmd.exe exitwin logoff
nircmd.exe exitwin shutdown

and for much more : View NirCmd Full Help File


Regards,
Tom
My System SpecsSystem Spec
Comment

 Restart - Add to Desktop Context Menu




Tutorial Tools Search this Tutorial
Search this Tutorial:

Advanced Search




Similar help and support threads
Windows 7 Tutorial Category
Add RUN to desktop context menu?
hello everyone! is there a way to add RUN to desktop context menu?
Customization
Explorer - Add "Restart Explorer" to Desktop Context Menu
How to Add "Restart Explorer" to Desktop Context Menu in Windows This tutorial will show you how to add Restart Explorer to the desktop context menu in Vista, Windows 7, or Windows 8. When used by any user, it will automatically kill the explorer.exe process, and restart the explorer.exe...
Tutorials
Log Off - Add to Desktop Context Menu
How to Add "Log Off" Computer to the Desktop Context Menu in Windows 7 This will show you how to add or remove Log Off computer to the desktop context menu in Vista and Windows 7. EXAMPLE: Log Off in Desktop Context Menu
Tutorials
Next Desktop Background - Add or Remove from Desktop Context Menu
Add or Remove "Next desktop background" from Desktop Context Menu in Windows 7 and Windows 8 A desktop slideshow is a slideshow of wallpaper images (pictures) of your choice on your desktop. When a desktop slideshow is being used in Windows 7 or Windows 8, Windows automatically adds Next...
Tutorials
put restart explorer into context menu
hi i ran across a few ways to put restart explorer in right click context menu but most use a batch file :( but i came across where you save as a reg. file but they didn't get into any detail here it is _________________________________________________ Windows Registry Editor Version 5.00 ...
Customization
Desktop Context Menu
Can anyone help me w/a little customization? In the attached picture, I want to move the StickyNote selection down into the New heading & also remove the (zipped) wording from New>Compressed (zipped) Folder. Anyone have any solutions?
Customization


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 21:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App