?
Solved

Scheduled script to reset a modem

Posted on 2011-10-25
4
Medium Priority
?
423 Views
Last Modified: 2012-05-12
Hi,

We have an analog modem in a Win7 PC that is used to dial out . Occasionally the modem hangs and leaves the telephone line open.

Is it possible to write a script or batch file that could be run as a scheduled task every 15 minutes to restart the modem (ie dropping the line and then having the modem ready for use again). Realise that occasionally it may interrupt a job in use but dont mind that.

If so any help please with the content of the script ?

thank you
0
Comment
Question by:matmos
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Gary Coltharp earned 1000 total points
ID: 37024256
@echo off
echo ATH0 >COMx (where x is the assigned COM port number of your modem)

Save your batch file, schedule through task manager
0
 

Author Comment

by:matmos
ID: 37025192
Thank you for quick response.

I get access is denied when trying this command manually from a DOS prompt (I guess as another application is using the modem - hence why it has opened the line).

Perhaps would be better to kill the application ?
0
 
LVL 12

Expert Comment

by:Gary Coltharp
ID: 37025305
Probably
0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 1000 total points
ID: 37026503
Hmm even if you could get  simple com port redirect to talk to the COM port like this from Win 7... I imagine it would have to "run as administrator" for starters, though don't think it would work anyway!

I suppose tests to do would be :

1. Install a terminal emulator that can talk to com port, e.g. Hyperterminal, haven't looked on my Win7 here yet if that is still around as an option.  If so see if the port is available, i.e. try a terminal session to com1 and see if you get any reponse from it.  In which case try the ath0 and see if that hangs up.

Meanwhile while in this state see if end tasking the application in task manager also kills the line.  If so then you could easily do a:

taskkill /FI "IMAGENAME eq whatever.exe"
or
taskkill /IM whatever.exe

Steve
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question