Shortcut to put your computer to sleep
Shortcut to put your computer to sleep
Hey there! I was thinking about how to set up a shortcut that puts your PC to sleep without going into hibernation. I’ve tried using a command-line method with Rundll32.exe and PowerProf.dll, but it ends up putting the system into hibernation instead of sleep. There’s also a hotkey on my Logitech K750 Keyboard that worked before, but now I’m using a different keyboard. What options do you have?
What keyboard are you operating with? And do you have any custom macros set up?
Have you attempted to turn off hibernation and used the method you already configured? Open Start, then enter cmd in the search bar. In the results, right-click Command Prompt and select Run as Administrator. When prompted by User Account Control, choose Continue. At the prompt, input powercfg.exe /hibernate off and press Enter. Type exit, then press Enter to close the Command Prompt window
Cool that fixed it thanks! Its unfortunate though that I have to have the icon on the desktop (as far as I know). Do you happen to know anyway around this?
You're suggesting a method to secure or hide a file by associating a key with its location. If that's the case, relocate the file to a less visible spot and bind the key to that new position so it appears as if the file no longer exists. Alternatively, simply move the file to another directory and use it as a shortcut on the taskbar.
You transferred the .bat file from your desktop to your Documents folder and reprogrammed the shortcut (Ctrl+F12), yet the change failed.
Bat files often need careful key bindings. Searching for "bat to exe convert" usually helps. Converting to an executable and linking it to your desktop key should fix things. I had to adjust this for one of my files. Using the executable lets you update its icon for a better appearance. If your batch didn’t include desktop links, that might have caused issues. It worked when run without a keyboard, but not when using the mouse.