Restart - Add to Desktop Context Menu

Page 2 of 2 FirstFirst 12

  1. Posts : 5,956
    Win 7 Pro x64, Win 10 Pro x64, Linux Light x86
       #10

    Works perfect, Thank you Shawn
      My Computer


  2. Posts : 72,058
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #11

    You're welcome Stephanie. Glad it could help. :)
      My Computer


  3. Posts : 27
    Windows 7 Ultimate x64
       #12

    derekimo said:
    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?
    Brink said:
    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
    ; https://www.sevenforums.com
    ; Tutorial: https://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
    Last edited by TomHartwald; 05 Nov 2013 at 13:49.
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About 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 20:11.
Find Us