make pc sleep after 40 mins even if mouse is moved

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
LVL 1
helpchrisplzAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
binary_1001010Connect With a Mentor Commented:
you might want to download WinOff. it is free.
0
 
naomelixesCommented:
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
 
dmitry_nCommented:
Disable mouse as wake-up event.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Sikhumbuzo NtsadaSenior IT TechnicianCommented:
I tried the following it worked on my win 7:

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

0
 
helpchrisplzAuthor Commented:
rundll32 powrprof.dll,SetSuspendState

ok how can i set a timer? so it waits 40 mins
0
 
Lionel MMSmall Business IT ConsultantCommented:
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
 
Lionel MMConnect With a Mentor Small Business IT ConsultantCommented:
sorry--for windows 7
C:\Windows\System32\Choice /c:yn /t:2400 /d:y
rundll32 powrprof.dll,SetSuspendState
0
 
helpchrisplzAuthor Commented:
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
 
Lionel MMSmall Business IT ConsultantCommented:
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
 
helpchrisplzAuthor Commented:
thank you i decided to go with WinOff it does everything i need and more
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.