batch scripts not running after 1st line

csePixelated
csePixelated used Ask the Experts™
on
on several workstations i cannot run multi line batch files or it seems i cannot write to my coms
it seems to run the 1st line and pause,
i then have to ctrl+c
it askes if i want to terminate the batch job (Y/N)

this happens when it is run from command line or from the batch

@echo on
set /p x="a01F 835318130300001" <nul >\\.\com17
set /p x="a01F 835318131400001" <nul >\\.\com17
set /p x="a01F 835318331400001" <nul >\\.\com17
EXIT

could windows firewall be effecting this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill PrewIT / Software Engineering Consultant
Top Expert 2016
Commented:
What is the name of the BAT script, it isn't ECHO.BAT by any chance is it?  If so that will be a problem, since it will just sit and spin calling itself over and over.

~bp

Author

Commented:
nope, file name is serial2.bat i made a batch named ech.bat

@echo off
echo hello
echo world
pause

it ran fine, so it would seem to have to do with the com

the below sets the com17 settings then stops

@echo on
mode com17 9600,E,8,1,P
echo 0000 1> com17
pause
IT / Software Engineering Consultant
Top Expert 2016
Commented:
Okay, it sounds like the interface on COM17 is not performing as you expect, have you tried using a Windows based GUI terminal emulation program to test out the serial communications to that interface first?  It might be a good way to shake out any problems or details before trying from a DOS command line.  There are some free ones out there, like http://realterm.sourceforge.net/.

~bp

Author

Commented:
well a restart after setting the serial port settings did the trick on one pc, then another stops working,
ty for the link, it may help.... i think the problem is im using a "Digi- port-server ts 8 MEI" and im trying to use the same port.... it would seem the port server locks ports to a specific ws....
does anyone know anything that will help, I would like to have multiple pc,s able to send data to the serial port without having to wrestle with each pc to get it to connect.

Bill i will accept your answer as one of the solutions as it has been quite help full, i normally use "tera term pro" it only can connect to ports 1-4...
Bill PrewIT / Software Engineering Consultant
Top Expert 2016
Commented:
Okay, understand, can't offer any help on that specific device.  Not sure if these are any help, but passing along just in case:

http://www.experts-exchange.com/Hardware/Networking_Hardware/Q_26189018.html

http://ftp1.digi.com/support/documentation/90000630_D.pdf

~bp

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial