Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DefCom

Computer Timer

This topic is 5793 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

Boring Bit: I have recently put a PC in my sons room with a TV card and video, which he as immediatley abused by watching at rediculous hours. So i want to make a program that once the computer has booted will check the time and if its not valid, shut down the computer. I can do the time validation stuff, but do not know where to start with the program running on Boot-up or making the system shut down. Any help will be much appriciated, thanks

Share this post


Link to post
Share on other sites
Advertisement
Hi

look at these WinAPI functions:
InitiateSystemShutdown() and ExitWindowsEx()

Another way to shut the system down is to call rundll.exe with parameters "user.exe,exitwindows" that works on my Win98, not sure about newer windows version though





Runicsoft -- home of my open source Function Parser and more

Share this post


Link to post
Share on other sites
And if you want to ''hide'' the program (so it doesn''t have to be in the autostart folder) and call it at startup open regedit, go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
and add an entry for your program



Runicsoft -- home of my open source Function Parser and more

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!