Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

shutdown.exe shortcuts work just fine to do Shutdown and Restart:

C:\Windows\System32\shutdown.exe /s /t 00

C:\Windows\System32\shutdown.exe /r /t 00

I don't want to do Hibernate, but I would like to do Standby like in Windows XP, with one double-click from my Desktop.

In Win 8, it takes more effort than necessary to click to Sleep.

So, I've read that you have to use the following rundll32 command to do Standby, and that Hibernation has to be off, so I made the following into a .bat file with a shortcut to it. It still requires me to press the power button to turn the computer on, as opposed to tapping a key on the keyboard, or moving the mouse:

C:\Windows\System32\powercfg -hibernate off

C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0

PsShutdown works great for all three: Shutdown, Restart, and Standby.
I'm currently using PsShutdown v2.52:

"C:\Program Files\Standby\psshutdown.exe" -k -t 0

"C:\Program Files\Standby\psshutdown.exe" -r -t 0

"C:\Program Files\Standby\psshutdown.exe" -d -t 0

I would just like to know what is the actual command that Windows 8 uses to put the computer into Sleep mode?

Is it a line command? Where do you find it? How do you figure out what it is?

I think I would use a line command, because it would be simpler than needing to use another program.

Windows 8 is getting the job done somehow. Maybe it really is more complicated to do, than using a couple of line commands.

share|improve this question
Highly unlikely that Windows relies on a separate EXE for this. PsShutdown might be calling the same APIs that Windows does, so maybe someone can debug it and figure out what it's doing, but how would that help instead of simply using the utility itself? –  Karan Nov 10 '12 at 15:45
Just for simplicities' sake. The program to do Sleep is either part of, or included with, Windows 8 - so, what is it, and, why get another program? Just figure out what it's doing when you click on the Sleep button. I'm not the person to ask how to do this. Is it too difficult to figure out? Is the code encrypted, and impossible to see? If so, then that's the answer for me, and I'm happy to use PsShutdown. I just want to find out the answer to this obvious question. –  Slack2012 Nov 10 '12 at 17:02
Because, there's no need for the OS to call a separate executable when it can just call the same API that the executable would have called. I don't promise that this is the exact API, but for example: msdn.microsoft.com/en-us/library/windows/desktop/… –  Mark Allen Nov 10 '12 at 23:00
This isn't bad: Use Alt + F4 repeatedly, as needed. It closes programs until you get to the legacy Shutdown menu. . . . If the computer Restarts within a minute after being put into Sleep / Standby, then go to: Network Connections / Ethernet / Properties / Configure / Power Management tab / [un-check] Allow this device to wake the computer But, I have downloaded Classic Shell, because I need the Start menu system back - and I see that it does Shutdown exactly how you want, so I'm using that. –  Slack2012 Nov 12 '12 at 14:11
I've tried using Tiles for the past week. I like them, but when I go to find something in the Metro interface: 1) Not everything is in Start, so there are more clicks to get to Apps, 2) I think it moves things around in Start based usage, so nothing is ever in the same place. I could be wrong, not sure, probably because I find myself sitting there simply having to spend time looking at what's in the group I made to find what I need, & 3) Programs are spread out a lot in Apps, requiring one to unnecessarily click vs. the Start menu system. They need to bring back the Start menu to Windows 8. –  Slack2012 Nov 12 '12 at 14:16

2 Answers 2

I decided that I will just use Classic Shell - the current version is 3.6.2 - it works great

share|improve this answer

Sounds like you might be expecting things to work like Linux.

The command line is well respected through most Linux programs and indeed, most of the time, many programs and dialog boxes are in fact constructing a command which is then executed - what this is really is loading an executable with specifying its "command line" arguments.

Windows isn't rooted in the same tradition and generally when something Windows has "exposed" functionality it's through DLLs or COM interfaces, or more recently .NET objects. So rather than invoking a command, Windows is far more likely calling a DLL function (by ordinal in some instances and NOT name), a COM or .NET object method.

This stuff is exposed to you, a non-programmer user, via rundll32 (but usually not well documented), the COM API (better be prepared to read a lot of docs, understand object oriented programming) which is accessible via Windows Script Host (another layer of componentry further made accessible to the end user via wscript.exe and/or cscript.exe) and .NET (break out Powershell and Visual Studio for this one). Many of the control panel applets and such in explorer.exe are likely making system calls, DLL calls, or COM calls directly.

Sounds messy, and it is. The good news is with the introduction of Powershell there's been a steady trend towards "cmdlets" being available within in that do practically anything and finally give Windows a consistent, rich commandline environment. I don't know the Powershell command to put Windows to sleep but I'm sure there is one.

I could be horribly wrong/incomplete about any or most of this (IANA Windows programmer), I'm sure others will comment and you should read those comments.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.