Windows 7 Clickable Shutdown / Restart / Lock / Hibernate / Sleep

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)
 

Attachments

  • Shutdown Computer.zip
    578 bytes · Views: 445
  • Restart Computer.zip
    575 bytes · Views: 413
  • Sleep Computer.zip
    607 bytes · Views: 441
  • Hibernate Computer.zip
    606 bytes · Views: 434
  • Lock Workstation.zip
    595 bytes · Views: 380
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".
 
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".

: )

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
 

Attachments

  • Shutdown options.zip
    587 bytes · Views: 354
Back
Top Bottom