-3

How can I to create a logoff shortcut, a suspend one and a shutdown one? I know how to make the shortcut but when I add a hotkey they only work on the log off one and after a while it stops working all together. I do have administrative access on my home PC, but not at work; the shortcuts do work but I’m having the same issues.

I want to be able to drag it off my USB flash drive onto the desktop and for them to work. Also would they work hidden? Also I don't have access to cmd or windows + r at work.

Giacomo1968
  • 58,727

2 Answers2

0
  1. Create a batch file, e.g. sleep.bat, containing the following text:

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

Make a shortcut to it (right-click, drag to a folder, and Create shortcuts here); name it as you like. Right-click on the new shortcut, select Properties and set the Shortcut key combination.

  1. For Logoff, follow the steps above but use the following script:

shutdown -l

  1. See MS TechNet guide to the Shutdown command for Shutdown, Hybrid Shutdown, Restart etc.

N.B. Hibernate has been deprecated for Windows 8, but if you have it enabled in PowerCfg, then the first script may Hibernate, rather than sleep.

0

Create a shutdown.bat file from a text document with the following text: shutdown.exe -s -t 0

Save as Shutdown.bat > then create a shortcut and place it on your desktop.

To create a restart button, change -s to -r;

to create a logoff button, change -s -t 0 to -l.

Then create corresponding shortcuts for those and change the icons to something more suitable in the shortcut's properties.

EDIT: This works without administrative permission on all Windows systems as far as I am aware.