Windows 10: Cmd sleep command but with timer Solved


  1. Posts : 46
    Microsoft Windows 10 Pro N 64-bit 10240 Multiprocessor Free
       07 Nov 2017 #1

    Cmd sleep command but with timer


    If you could help i found :\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState Sleep but i need -t 180 secs which doesnt work with this and i dont want to use third party programs..

    tyvm
      My ComputerSystem Spec

  2.    07 Nov 2017 #2

    In CMD you can use "timeout" or in PowerShell you can use "Start-Sleep" to start a 180s timer. Just create a script with the timeout command followed by the SetSuspendSleep command.

    Or if you want it in one line you can do
    Code:
    timeout /t 180&&rundll32.exe powrprof.dll,SetSuspendState Sleep
      My ComputerSystem Spec


  3. Posts : 46
    Microsoft Windows 10 Pro N 64-bit 10240 Multiprocessor Free
    Thread Starter
       07 Nov 2017 #3

    PolarNettles said: View Post
    In CMD you can use "timeout" or in PowerShell you can use "Start-Sleep" to start a 180s timer. Just create a script with the timeout command followed by the SetSuspendSleep command.

    Or if you want it in one line you can do
    Code:
    timeout /t 180&&rundll32.exe powrprof.dll,SetSuspendState Sleep
    ty i actually thought timeout or sleep command but wasnt sure thnx

    for some reason it doesnt work lol .. powershell doesnt recognize && operator so to line bat scripted worked
    Last edited by Cromax; 07 Nov 2017 at 17:41.
      My ComputerSystem Spec

  4.    07 Nov 2017 #4

    Sorry, forgot to mention that "&&" only works in CMD. You use ";" to concatenate commands in PowerShell.
      My ComputerSystem Spec


 

Related Threads
How to do them without breaking something? Sleep in my computers are hybrid (desktop) and not hybrid (laptop). Quick boot is off.
What is the Intel Watchdog Timer in Drivers and Hardware
My ESET Antivirus keeps telling to install Intel Watchdog Timer. I have latest Intel chipset drivers installed from ASUS for my Prime H270 Plus motherboard, but not sure if this timer thing is needed or I can disregard the alert from ESET. Running...
I've gone into the power & sleep settings, even the advanced power settings and set all to one hour, yet the computer still goes to sleep after 2 minutes if left alone. Help. Thanks, Mike
If I use the power icon and thenclick sleep my backup software will wake up my computer and backup run myschedule. If I use any of the followingcommand lines, the software cannot wake my computer, I have ran “powercfg/h /off” at C:\windows\system32...
If I have say 10 programs up and am in the middle of things on each and I hit sleep then: 1.) The computer indeed goes to sleep i.e. the CPU Fan goes off. 2.) When I come back several hours later I always find that the CPU fan is on. 3.)...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:48.
Find Us