PDA

View Full Version : Need a program to disconnect modem at certain time.


Angry
11-25-02, 12:12 AM
Guys,

I need a program that will run in WinXP and disconnect my dail-up modem at like 6am in the morning...

Ive searched google like crazy and cant find anything...

Angry
11-25-02, 01:11 PM
ANybody?

JoT
11-26-02, 10:04 AM
if you're not actively downloading anything or browsing after you leave it, you can have windows automatically disconnect after a certain amount of time (it's in the dial-up) properties; you could try that, or you could do what I do and get up at 6 and disconnect :rolleyes:

ronin1967
11-26-02, 10:51 AM
Create a script to run as a sheduled task. The script would run the AT command for your particular modem, just include the disconnect command in the script. Then set scheduled taks to run the script at 6:00AM

JoT
11-26-02, 06:58 PM
and what sort of script would this be and how would it be executed? I'm quite interested in the same thing as Angry :D

ronin1967
11-26-02, 08:01 PM
Well inspite of the luxury of Windows modems still use commands to perform actions. Write the script using notepad or any text program, then save the file as [some name].BAT or [some name].CMD Then you use Sceduled Tasks to run the [some name].BAT or [some name].CMD file at 6:00AM.

First we have to know what type modem you use. Then the rest is fairly simple.

The default AT command for Hangup is Hn where n=0 On Hook (Hang Up) n=1 Off Hook

So the script would include ATH0

JoT
11-26-02, 09:39 PM
ah....ha *confused* :confused:

EluSiOn
11-26-02, 09:57 PM
I would suggest you create a schedule task runs @ 6am excuting the follow command

shutdown -r -t 00 -f

----------------------------------
It means restart now and force all application to close. I mean after reboot.... your modem should be d.c right?

ronin1967
11-26-02, 10:05 PM
Originally posted by JoT
ah....ha *confused* :confused:

I didn't mean to confuse, I will try and explain.

Modems use AT commands to perform functions, back in the old days you actually had to type the command in a DOS or Command Propmt window to get them to do stuff. Windows has created GUI to replace the old way, however the commands are still used.

Task Sheduler is a program that has been incorporated into Windows since the begging. You can use Task Scheduler to perform actions on programs at certains times or intervals, ie Task Scheduler tells your Anti-virus software when to check for updates.

We could write a script to tell the modem to hangup. We then save the script and rename it [some name].BAT

Then we create a scheduled task to run [some name].BAT at 6:00am(or whenever you like)

That's it.

JoT
11-27-02, 12:24 AM
oohhhh, that makes sense :)

I'll try it out tonight :cool:

ronin1967
11-27-02, 12:26 AM
okay, let me know how it goes...

JoT
11-27-02, 12:34 AM
Originally posted by EluSiOn
I would suggest you create a schedule task runs @ 6am excuting the follow command

shutdown -r -t 00 -f

that's the command to reboot *just discovered that the hard way* lol


edit: oh yesh, I need to hunt down my modem log and look for the command to disconnect