Shortcut for sleep... not BIOS sleep, though.

Discussion in 'Windows 7 Help and Support' started by zx6r1033, Apr 1, 2010.

  1. zx6r1033

    zx6r1033 New Member

    Joined:
    Feb 2, 2009
    Messages:
    128
    Likes Received:
    1
    Hopefully this isn't as hard to explain or understand as what I've made it out to be in my own head.

    Anyway... I am trying to create a shortcut to put my pc (W7 x64) into sleep. Every single how-to that I can find on the internet, however, puts the PC into sleep at BIOS level. It isn't the same as clicking the "sleep" option in Windows 7. What I want is a way to put my PC into sleep the same as if I were clicking the "sleep" option in the start menu. Does anyone know how to do this?
     
  2. cybercore

    cybercore New Member

    Joined:
    Jul 7, 2009
    Messages:
    15,823
    Likes Received:
    321
    1. PsShutdown :

    EXTRAT the files to C:\PsTools\

    For shutdown use:
    C:\PsTools\psshutdown.exe -k -t 00

    For restart use:
    C:\PsTools\psshutdown.exe -r -t 00

    For hibernate use:
    C:\PsTools\psshutdown.exe -h -t 00

    For logoff use:
    C:\PsTools\psshutdown.exe -o -t 00

    To lock the computer use:
    C:\PsTools\psshutdown.exe -l -t 00


    ~~~~~~~~~~~~~~~~~~~~~~


    2. Autohotkey :


    #NoTrayIcon
    Send {LWin Down}{Right}{Right}{S}
    ExitApp


    OR


    #NoTrayIcon
    DllCall("powrprof.dll\SetSuspendState","Int",0)
    ExitApp



    ~~~~~~~~~~~~~~~~~~~~

    3. New Shortcut > rundll32.exe powrprof.dll,SetSuspendState 0,1,0
     
    zx6r1033 and (deleted member) like this.
  3. cybercore

    cybercore New Member

    Joined:
    Jul 7, 2009
    Messages:
    15,823
    Likes Received:
    321
    Instead of shortcut, you can press Win -> -> S (Press and hold down Win, then Right twice, then S).
     
    zx6r1033 and (deleted member) like this.
  4. zx6r1033

    zx6r1033 New Member

    Joined:
    Feb 2, 2009
    Messages:
    128
    Likes Received:
    1
    Thanks cybercore! setsuspendstate 0,1,0 was the first option I tried... posted all over the internet. It looked like a bios level sleep option. Psshutdown worked amazingly for me, though.

    The shortcut was actually for use with phonemypc so I can control my computer from my smartphone. That was one of the things that made finding a how-to so difficult. Keyboard shortcuts wouldn't work.

    Again, Thanks!
     

Share This Page

Loading...