Avatar of csePixelated
csePixelated
Flag for United States of America asked on

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
EXIT

could windows firewall be effecting this?
Windows Batch

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon
SOLUTION
Bill Prew

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
csePixelated

ASKER
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
ASKER CERTIFIED SOLUTION
Bill Prew

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
csePixelated

ASKER
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...
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes