Jump to content
  • Advertisement
Sign in to follow this  
bluefox25

Is it possible to make a shutdown timer?

This topic is 4045 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi My brother asked me the other day if I could make him a program that could shudown his pc at work at an allotted time. Is this possible? Where can I get more info on how to do this? Ihave basic C++ knowledge so its probably not enough.

Share this post


Link to post
Share on other sites
Advertisement
google for: "windows shutdown c++". You're feeling lucky.

as for the timing that's pretty simple. You just launch a process that intermittently checks the system time (again google). When the time is right execute the shutdown code.

Dangers of this system:

1) your brother stays late and is in the middle of doing something. He might lose saved data (though the apps should prompt him to save before quitting).
2) his work doesn't let him install 3rd party applications and he gets fired
3) etc

-me

Share this post


Link to post
Share on other sites
Windows provides the shutdown program, with a -t option. It may also be scheduled using the task scheduler. I would suggest a shutdown -t 120 two minutes before the closing time, with a shutdown -a shortcut somewhere nearby, in case you want to cancel it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!