New
#20
I'll give it some more time to make sure it's safe first since it is an .exe file from an unknown source.
I uploaded your Sleep.ZIP file to virustotal.com. The resulting report has 2 hits which state it could be "W32/Symmi.AJ.gen!Eldorado" infected, whatever that is. I don't know if this is correct or not. virustotal.com is a free service which uses 57 different virus scanners. These could be just false positives. However, since the report is not clean, I cannot use this file. I just wanted to give anyone who is thinking about using this file a friendly warning.
I used the create shortcut method first using the command:
C:\Windows\System32\rundll32.exe Powrprof.dll,SetSuspendState
and then:
C:\Windows\System32\rundll32.exe Powrprof.dll,SetSuspendState Sleep
Because I have Hibernate enabled, using the shortcut put my computer into Hibernation mode instead of sleep. Unless you turn off Hibernation, you cannot use a simple shortcut to put your PC to sleep. I guess Microsoft just wanted to make things harder for us.
It a false positive.
The file is nothing more than a shortcut that runs a .vbs file, and both are 100% safe and clean. Here's the contents of the .vbs file below.
Code:Dim objShell Set objShell = CreateObject("Shell.Application") objShell.ShutdownWindows set objShell = nothing Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys "{Enter}" Set WshShell = Nothing
Yep, you must have hibernate disabled for the sleep shortcut to work as noted under Method Two.
thanks!
just used it to my new win7 pc
OPTION TWO
Manually Create the Shortcut
- works like charm
Hi!
Three things to mention & query :
1. Sleep.vbs is taking my windows 8.1 x64 laptop to Shut Down even after setting the Power Button to Sleep. Hibernation is on But Hybrid Sleep is Off. Am I supposed to provide any images or reports ?
2. There are better Icon options available for Sleep function at the address :
%SystemRoot%\system32\SHELL32.dll
3. I am using the '' PsShutdown -d -t 0 " command ( SysInternals Utility : PsTools / PsShutdown.exe ) for the shortcut. ( Ref : Microsoft Community Thread : 2nd Response )
Is it a safe practice technically ?
Thanks. ...
UPDATE : Enjoyed! I had to Change Default Action of Alt+F4 "Shut Down Windows" Dialog to Sleep : EightForums i.e. the very same thing as the 4th Option ( Registry Option ) & 5th Option ( Group Policy ) as Change the Default Windows 7 Start Menu Power Button Action to Sleep!
But Group Policy Registry is not available in windows 8!
Last edited by Vineet Garg; 08 Apr 2021 at 08:35.