ping google.com
如果返回成功,ECHO您连接到互联网
否则返回ECHO您没有连接到互联网
@echo off Ping www.google.de -n 1 -w 1000 if errorlevel 1 echo Not connected