1.    2 Weeks Ago #1
    Join Date : Aug 2015
    Posts : 30
    Microsoft Windows 10 Pro N 64-bit 10240 Multiprocessor Free

    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.    2 Weeks Ago #2
    Join Date : Oct 2017
    Posts : 15
    Win10

    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.    2 Weeks Ago #3
    Join Date : Aug 2015
    Posts : 30
    Microsoft Windows 10 Pro N 64-bit 10240 Multiprocessor Free
    Thread Starter

    Quote Originally Posted by PolarNettles 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; 2 Weeks Ago at 17:41.
      My ComputerSystem Spec
  4.    2 Weeks Ago #4
    Join Date : Oct 2017
    Posts : 15
    Win10

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

 


Similar Threads
Thread Forum
Sleep and hibernate command line
How to do them without breaking something? Sleep in my computers are hybrid (desktop) and not hybrid (laptop). Quick boot is off.
General Support
What is the Intel Watchdog Timer
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...
Drivers and Hardware
Solved Computer goes to sleep 2 minutes after last command
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
General Support
Solved Win 10 home 64 bit command line Sleep command
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...
General Support
How do you set the various parameters of the sleep command?
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.)...
General Support
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 15:30.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums