PDA

View Full Version : Tricky tasking


khensonm
01-29-2001, 03:01 PM
Hello! I am running Win95 on a Dell laptop. What I am trying to do is automatically limit the amount of time my 13-yr-old son spends on AIM (AOL Instant Messenger). Obviously the traditional "Son, your time is up -- got off the machine" approaches are not working, as I don't return home from work until quite late and there is very little way to enforce timings. The boy is starting to live inside the computer, so I am trying to limit him so that he is forced to go outside and play basketball with the neighbours' kids, etc. His science teacher requires that they use the Internet almost every night, so removing the machine or disconnecting the cable modem isn't the answer.

I was a UNIX sys admin and wrote a lot of cron jobs, wrappers, and backends, but am not that familiar with Win95. I envision writing a wrapper for AIM that looks something like this:
- erase any old dummy file (see next step)
- create a dummy file (basically just a file with a date -- something like UNIX does with "touch") to give an indication when AIM started
- run AIM

Then, a task would run every 15 mins or so at bootup, checking if this dummy file exists. If yes, somehow keep track of the time that AIM is running based on the dummy file timestamp and, after TIME X, start giving warning messages. At TIME Y, shut down AIM if it is still running.

I would also need to make sure that he doesn't just kill AIM and restart it. What I need help with (as far as I can tell) is:
- how to check for the existence and timestamp of a file
- how to check if a process is running
- how to kill a process (is there a "kill -9" equivalent?)

Obviously I am thinking like a UNIX person, and am probably making this more difficult than it is. Any suggestions would be greatly appreciated.

sea69
01-29-2001, 10:58 PM
password aim.

------------------
ok...so now what ??

Paleo Pete
01-30-2001, 05:12 AM
Passwording it wouldn't work, that would prevent access at all, and some access is apparently necessary.

Check SimTel (http://www.simtel.net/simtel.net/) and WinFiles (http://www.winfiles.com) and see if you can find some sort of security or lockout program that will automatically shut down the Internet connection after a certain time, or something similar. I know they have utilities that will record every keystroke, password the entire system to prevent access, etc, but I'm not sure if they have an internet timer.

I'm using an automatic dialer called Net Launch, it's freeware I think, that will log on automatically, and looks like it will disconnect automatically if I set it up, but I've never tried that option. I can't find an option to password the program, but you should be able to remove all links in the start up menu and task bar, so it can only be accessed from the exe file in Windows Explorer, I'm not sure if it would serve your purposes though.

I was going to suggest calling your ISP to see if they can shut it down for you at a specific time, but I doubt if AOL would do that...A local ISP might be cooperative, but AOL would mean a long distance phone call, and they would probably tell you they can't do it.

Check the links above, you might be able to find something a bit closer to what you want. I don't have a clue how to write such an application, but I'm sure it could be done.

------------------
If at first you don't succeed, skydiving is not for you!
Note: Please post your questions on the forums, not in my email.

Computer Information Links (http://www.geocities.com/paleopete/)

Ghost_Hacker
01-30-2001, 06:39 PM
You might also check into using Vbscript. I have used it in NT for stopping and restarting processes and also for moving files.Try this link for more information : Microsoft scripting (http://msdn.microsoft.com/scripting/default.htm)


------------------
"It's just a whisper in my Ghost"



[This message has been edited by Ghost_Hacker (edited 01-30-2001).]