The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Email Subscription

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 716 other subscribers

Commandlines for shutdown, reboot, logoff, standby and hibernate (from: A standby shortcut? – The PC Guide Discussion Forums)

Posted by jpluimers on 2009/06/11

Being a commandline person (I prefer to think of it as ‘classic’ more than like ‘dinosaur’), I have a ton of batch-files in my %SystemDrive%BIN directory.

Recently, I needed one for hibernating, which I found in this posting: A standby shortcut? – The PC Guide Discussion Forums.

Here is the list:

Shutdown.bat / Halt.bat %windir%System32shutdown.exe -s
Reboot.bat %windir%System32shutdown.exe -r
Logoff.bat %windir%System32shutdown.exe -l
Standby.bat %windir%System32rundll32.exe powrprof.dll,SetSuspendState Standby
Hibernate.bat %windir%System32rundll32.exe powrprof.dll,SetSuspendState Hibernate

Maybe it has some use for you too :-)

–jeroen

4 Responses to “Commandlines for shutdown, reboot, logoff, standby and hibernate (from: A standby shortcut? – The PC Guide Discussion Forums)”

  1. Bert Haver's avatar

    Bert Haver said

    Hi Jeroen,
    I like batchfiles too! We are using batchfiles for scripting withing our (Kaseya) PC (Windows) maintenance system.
    I’m looking for a command line sequence to remotely disable Windows powersettings. Have you ever needed/found this somewhere?

  2. mhestl's avatar

    mhestl said

    Nice…
    Since your still using batch files…As a commandline person are your familiar with Powershell?
    If not check it out (Channel9 has some cool demo’s on Powershell: http://channel9.msdn.com/tags/PowerShell/)

    • jpluimers's avatar

      jpluimers said

      For smaller things, I still tend to use plain batch files.
      When it gets more complex, I use more advanced scripting tools highly depending on my environment (like OS ).
      I’m not yet completely familiar with Powershell, but that’s because of its’ vast possibilities.
      I do use it though.

      –jeroen

Leave a Comment