Clickable Shutdown / Restart / Lock / Hibernate / Sleep

Discussion in 'Windows 7 Tutorials' started by cybercore, May 2, 2010.

  1. cybercore

    cybercore New Member

    Joined:
    Jul 7, 2009
    Messages:
    15,823
    Likes Received:
    321
    An alternative to the shutdown menu is clickable shortcuts.



    Right-click -> New -> Shortcut -> Location of the item:



    Shutdown Computer

    Code:
    Shutdown.exe -s -t 00


    Restart Computer


    Code:
    Shutdown.exe -r -t 00


    Lock Workstation


    Code:
    Rundll32.exe User32.dll,LockWorkStation


    Hibernate Computer


    Code:
    rundll32.exe PowrProf.dll,SetSuspendState


    Sleep Computer


    Code:
    rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    ~~~~~~~~~~~~~~~~~



    Autohotkey users:



    Shutdown

    Code:
    [SIZE=3]Shutdown, 1[/SIZE]





    Logoff

    Code:
    [SIZE=3]Shutdown, [/SIZE][SIZE=3]0[/SIZE]




    Reboot

    Code:
    [SIZE=3]Shutdown, [/SIZE][SIZE=3]2[/SIZE]




    Force Shutdown (without saving settings)

    Code:
    [SIZE=3]Shutdown, 4[/SIZE]




    Force a reboot
    (without saving settings)

    Code:
    [SIZE=3]Shutdown, 6[/SIZE]




    Hibernate

    Code:
    DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
     

    Attached Files:

  2. fjgold

    fjgold New Member

    Joined:
    Jan 11, 2009
    Messages:
    1,111
    Likes Received:
    60
    Thanks for the info Cyber,
    I've been using the shutdown shortcut for years.
    I have a similar shortcut on all my Linux OS's as well.
    It is a shortcut to little python script I found on the net that resides in my home folder.
    Clicking it brings up a small dialog box where I can select "shutdown" or "restart".
     
  3. cybercore

    cybercore New Member

    Joined:
    Jul 7, 2009
    Messages:
    15,823
    Likes Received:
    321
    : )

    Feel free to share this script in the Linux section, if you wish.

    : )

    You can make the same shortcut for Windows, type this in for the 'Item location' when creating the shortcut:

    Code:
    [B]taskkill /im explorer.exe[/B]
    This brings up a dialog box to select shutdown/restart/sleep/etc.

    Shutdown options.JPG
     

    Attached Files:

  4. fjgold

    fjgold New Member

    Joined:
    Jan 11, 2009
    Messages:
    1,111
    Likes Received:
    60
    DONE!!!

    Thanks for the additional info, works great.
     
  5. cybercore

    cybercore New Member

    Joined:
    Jul 7, 2009
    Messages:
    15,823
    Likes Received:
    321

Share This Page

Loading...