Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stupid Computer Tricks (Not)
Stupid Computer Tricks (Not)
#1
Pretty much what it says on the tin.  I propose this thread be dedicated for highly useful little 'hacks' that are little known and obscure, but relatively easy to pull off.

I'll get this party started, as usual.  Tongue


What to do if I do not have a Sleep/Suspend/Hibernate key?
(Applies to all versions of from Vista and afterwards)

This is an issue that plagues folks that want the definitive sleep mode and not the hibernation mode, but still want that around as well.

First, some background info - namely why?  Skip down to the next break if you can't be bothered with this part.

The thing is, it is possible to create a shortcut with a an assigned hotkey that will put your computer to sleep... but that requires that you disable hibernation mode in your settings.

Some folks don't want to go either/or on hibernation or sleep mode.  For whatever reasons, some of us want both.  It's especially useful to have on a laptop running on battery mode.  It can make a big difference between "Stepping away for ten minutes" and "Throw it in the bag because I'm driving for the next two hours".

In the case of the former, you don't want a full power-down because that actually uses more power bring everything back up - and that's to say nothing of the flurry of activity the hard drive will go through to save everything for hibernation.  Especially if you're still using an HDD instead of an SSD.  You're only stepping away for, what?  Ten, fifteen, maybe even twenty minutes?  Sleep mode saves plenty of power in that kind of time frame.

On the other hand, if you're traveling (short, medium, long distance, doesn't matter) and you need to throw your laptop into whatever bag-of-holding you're using AND (of course!) you want to pick up exactly where you left off.... you don't want sleep mode, you want Hibertaion.  I've had my computer suddenly wake unexpectedly while in the bag in the middle of a two-hour drive.  Imagine my dismay when I open it up to find a laptop that's practically roasting in the bag and my battery has a nasty dent in it's available charge (or even completely depleted).  Hibernation is the way to go here because it doesn't have the wake-on-hair-trigger that Sleep Mode has.  It also completely powers down your laptop, so you can be assured that your battery life is going to be exactly as you found it when you power on again - minus the surge of energy needed to hibernate and wake in the first place.



So, in general, laptop users want both, and for very good reason.

Now how do we get that with a shortcut key on a keyboard with no sleep key?

Fortunately, PsTools is here to the rescue.

PS Tools has been coded up by the venerable Mark Russinovich, whose contributions to the community go above and beyond.  These are a set of...  You can call them Power User Tools for Windows of the Post-Vista era.  They're compatible with everything from Windows Vista on up because they use the command line to work their magic.

You can find PsTools right here on Microsoft's website:
https://docs.microsoft.com/en-us/sysinte...ds/pstools

The one you want will be PsShutdown.  Get that one out of the bunch (or all of them if you want even more goodies) and unzip them into your \Windows\System32\ folder.

Once you've done that, make a new shortcut on your desktop.

You'll want one of the following lines in the "Target" field.

For Sleep Mode:

C:\Windows\System32\psshutdown.exe -d -t 0

For Hibernation:

C:\Windows\System32\psshutdown.exe -h -t 0

Make changes where necessary if your drive path is different.

The flags used are pretty simple to understand.  The flags -d triggers Sleep Mode and -h triggers Hibernation.  The -t flag with the number zero is needed because the application has a default time delay of twenty seconds, so if you want instant results, make sure -t 0 is in there.  Although if, for some reason, you want a grace period, enter it in place of the zero using the 24-hour format of HH:MM:SS.

Next up, you can go ahead and assign it a hot key for quick access from a standard keyboard.  Under the "Shortcut" tab, go to the field that says "Shortcut Key" and then use the keystroke that you'd like to have assigned.  I use Alt-F1 for mine.  (Keep in mind, it has to be something unique because this will be a global keystroke.)

Alternatively, if your keyboard has multifunction keys that can be mapped to a specific keystroke or launching a program (as many Logitech keyboards do), you can use that instead.

As an added thing, if you don't want that icon cluttering up your desktop, just go to the "General" tab and tick the check box for "Hidden".  As long as you don't have "Show Hidden Files" ticked in your folder options, it should stay out of sight.

Finally, you may get a once-off EULA agreement.  Accepting it once will make sure it doesn't come back again, but on the offhand chance it does, add the flag -accepteula as well to keep it from messing with your mojo.

Hope this makes someone's day a bit better.  Have fun storming the castle!
Yasuri Nanami is my number one waifu, if only because she would horribly murder all the others if they didn't shut up and toe the line.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)