Windows ping a network segment and cannot run the specified software
: Begin@echo offcolor 0aTitle Net Test Tool by:hruingermode con cols=109 lines=30:startecho. Echo ==========================================================================echo. echo Auto-connect test tool echo made by HRuinger.ECHO.ECHO This window operator disables the shutdown of Echo.echo ============================== ============================================echo.echo.echo.:tunnelecho%date% %time%ping-n 4 192.168.159.132echo%errorlevel%if/i%errorlevel% equ 1 start Javagoto begin
Attention:
1. : Begin
...
Goto BEGIN
is the content to loop through.
2. Print out the current date time information: Echo%date% %time%
The-n 4 parameter in the ping command acts: Sets the number of data echo requests sent.
The address to ping 192.168.159.132
4.
Many DOS programs return a numeric value at the end of the run to indicate the result (or status) of the program's operation, called the error code ERRORLEVEL or return code.
The common return code is 0, 1. The IF ERRORLEVEL command can be used to determine the return value of the program, depending on the return value to determine the execution of different commands.
5.if/i%errorlevel% equ 1 Start Java is the specified running software, if it is an. exe file, do not write the specific path, the location of the running software, add to
The environment variable.
6. Refer to the Bat command specifically.
Windows ping a network segment and cannot run the specified software