Link to home
Start Free TrialLog in
Avatar of bkerson
bkersonFlag for Canada

asked on

I need a .bat file that looks like this: to launch Hyperterminal and dial automatically a phone number then end the call after copying files.

I need a .bat file  (Batch File)

1) Launch Hyperterminal and dial automatically a phone number
C:\Program Files\Windows NT\hypertrm.exe
2) Copy some files and then end the call or close Hyperterminal automatically

How can i do that please?
Avatar of bkerson
bkerson
Flag of Canada image

ASKER

Hi Vee_Mod,

Thank you for replying me on my request.
OS : Windows XP
Application : Hyperterminal
What I need, is simple but difficult to figure it out. I need a batch file to load hyperterminal and launch a call on its own. or how to use hyperterminal in a batch file that can open automatically a .ht file to launch a call. Is there any switch for hypertrm.exe. Any idea will be greatly appreciated
ASKER CERTIFIED SOLUTION
Avatar of matrixnz
matrixnz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bkerson

ASKER

Hi

This is a good idea however we can send in telnet I don't thing we can copy or get a file from a remote server. Don't we. If so how we can copy the files remotely.
Avatar of bkerson

ASKER

This has been resolved by using a vbscript. This vbscript uses hypertherminal to dial then the script enter automatically username and password. Done!!!!!!!!

Before loading the script create an ht file in hypertherminal

Set oshell = createobject("Wscript.Shell")
oshell.run"cmd.exe"
wscript.sleep 500
oshell.sendkeys"hypertrm.exe d:\smtplogs\router.ht"+("{Enter}")
wscript.sleep 6000
oshell.sendkeys"%t"
wscript.sleep 500
oshell.sendkeys"t"
wscript.sleep 500
oshell.sendkeys"d:\smtplogs\router.txt"+("{Enter}&q uot;)
wscript.sleep 12000
oshell.sendkeys" "
wscript.sleep 6000
oshell.sendkeys" "
wscript.sleep 1500
oshell.sendkeys" "
wscript.sleep 1500
oshell.sendkeys" "
oshell.sendkeys"exit"+("{Enter}")
wscript.sleep 1500
oshell.sendkeys"%f"
wscript.sleep 1500
oshell.sendkeys"x"
wscript.sleep 1500
oshell.sendkeys("{Enter}")
wscript.sleep 1500
oshell.sendkeys"exit"+("{Enter}")
set oshell = nothing