Solved

make pc sleep after 40 mins even if mouse is moved

Posted on 2011-03-25
10
520 Views
Last Modified: 2012-05-11
hi all i am trying to set a timer to make a p.c go to sleep mode after 40 mins

i have looked at some stuff already but cant find anything to make it sleep

"shutdown -s -t 20000"

-s for shutdown
-r for restart
-t for time

what about sleep?

i would like to put the p.c to sleep after 40 mins even if the mouse moves. (mouse is very high DPI and moves when the traffic out side goes by i live by a busy street) :S

if there is a way of doing it can i make a shortcut and make the command run when the shortcut is opened .cant remember how i did it last time.

i run windows 7
0
Comment
Question by:helpchrisplz
10 Comments
 
LVL 6

Expert Comment

by:naomelixes
Comment Utility
This command:

rundll32 powrprof.dll,SetSuspendState

makes the computer go to sleep. Just make a .cmd file with this command in it, and schedule it to run whenever. :)
0
 
LVL 3

Expert Comment

by:dmitry_n
Comment Utility
Disable mouse as wake-up event.
0
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
Comment Utility
I tried the following it worked on my win 7:

http://www.vistax64.com/tutorials/165412-sleep-shortcut.html

0
 
LVL 1

Author Comment

by:helpchrisplz
Comment Utility
rundll32 powrprof.dll,SetSuspendState

ok how can i set a timer? so it waits 40 mins
0
 
LVL 24

Expert Comment

by:lionelmm
Comment Utility
What version of Windows do you have--if Windows 7 ignore this--has compatibility issues
Check out this link
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

One of the tools is called sleep.exe which can be run with a time parameter
sleep n where n is seconds so for 40 minutes its 40 * 60 or 2400
sleep 2400

test it by doing sleep 1 (1 second)

If you have Windows 7 you can create a batch file like this

C:\Windows\System32\Choice /c:yn /t:2400 /d:y
rem      rundll32 powrprof.dll,SetSuspendState

0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 24

Assisted Solution

by:lionelmm
lionelmm earned 250 total points
Comment Utility
sorry--for windows 7
C:\Windows\System32\Choice /c:yn /t:2400 /d:y
rundll32 powrprof.dll,SetSuspendState
0
 
LVL 1

Author Comment

by:helpchrisplz
Comment Utility
yes thank you that is great but its going to hibernate with rundll32 powrprof.dll,SetSuspendState

is there no way to trigger sleep mode?

hibernate is great but sleep is quicker to restore from.
0
 
LVL 24

Expert Comment

by:lionelmm
Comment Utility
What version of Windows do you have?
Have you setup the Power Options (Control Panel) for Sleep mode instead of hibernation? This command does what the settings are in the power options!
0
 
LVL 9

Accepted Solution

by:
binary_1001010 earned 250 total points
Comment Utility
you might want to download WinOff. it is free.
0
 
LVL 1

Author Closing Comment

by:helpchrisplz
Comment Utility
thank you i decided to go with WinOff it does everything i need and more
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now