what is the command to put my computer in standby mode?

2

2

I have a Microsoft keyboard that I just bought, but it has no sleep button. what it does have is 5 programmable keys that can open programs. I want to program one of the buttons to put the computer in standby mode (where the power light is flashing). what I am using right now is "Rundll32.exe Powrprof.dll,SetSuspendState Sleep" and "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" but these do something different (the power light is off, not flashing) what would be a command that I would use to put the computer in standby mode?

Ephraim

Posted 2011-04-18T20:35:20.430

Reputation: 248

Ah, was hoping to be able to give an answer from the shutdown command-line program, but it looks like it only does hibernate, but not standby. – eidylon – 2011-04-18T20:42:05.187

Shutdown -h can also hibernate the computer – wullxz – 2011-04-19T06:06:58.793

Answers

8

Shutdown

%windir%\System32\shutdown.exe -s

Reboot

%windir%\System32\shutdown.exe -r

Logoff

%windir%\System32\shutdown.exe -l

Standby

%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby

Hibernate

%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate

sammarcow

Posted 2011-04-18T20:35:20.430

Reputation: 325

1There's no Turn On command? :-) – user541686 – 2011-04-19T06:15:19.987

1Do not use rundll32 for functions that are not specifically designed as such. – user1686 – 2011-04-19T14:23:46.017

interesting @grawity observation! – kokbira – 2011-04-20T19:17:22.990

1

I'm pretty sure you can find a PowerShell command to do that, save it on a script file and set your keyboard execute that.

Check on google for "Powershell Standby", this looks good.

mtone

Posted 2011-04-18T20:35:20.430

Reputation: 11 230

0

You can also customise what the power button (the button you turn on your computer with) does. You can set it to cause hibernate, sleep or shutdown. This can be changed via power options.

apoorv020

Posted 2011-04-18T20:35:20.430

Reputation: 2 274