batch scripts not running after 1st line

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

could windows firewall be effecting this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
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.

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

@echo off
echo hello
echo world

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
Bill PrewIT / Software Engineering ConsultantCommented:
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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
csePixelatedAuthor 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 ConsultantCommented:
Okay, understand, can't offer any help on that specific device.  Not sure if these are any help, but passing along just in case:

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.