Clickable Shutdown / Restart / Lock / Hibernate / Sleep

#1
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

fjgold

New Member
#2
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
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

fjgold

New Member
#4
: )

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

: )
DONE!!!

Thanks for the additional info, works great.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.