开发者

Starting a second command while the first is still running from a batch file

开发者 https://www.devze.com 2023-02-05 00:23 出处:网络
I am trying to create a batch file that will run a utility that opens a connection to a device on the internet then starts a telnet session. I am at the point where once the connection opens the batch

I am trying to create a batch file that will run a utility that opens a connection to a device on the internet then starts a telnet session. I am at the point where once the connection opens the batch file doesn't proceed.

Batch file

@echo off  
set /p serial=What are the last 8 of the STB's serial?   

udp.exe -c 127.0.0.1 23 %serial% x.x.x.x 11111 127.0.0.1 23 | telnet 127.0.0.1
开发者_运维百科

Output

What are the last 8 of the STB's serial? XXXXXXX  
Ready for XXXXXXX

It just sits at the 'ready ...' line and never opens the telnet connection. I have tried various | and & but no luck.


Would start /B help?

Start /? gives

Starts a separate window to run a specified program or command.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/WAIT] [/B] [command/program]
      [parameters]

    "title"     Title to display in  window title bar.
    path        Starting directory
    B           Start application without creating a new window. The
                application has ^C handling ignored. Unless the application
                enables ^C processing, ^Break is the only way to interrupt
                the application
...
0

精彩评论

暂无评论...
验证码 换一张
取 消