可以自动获取电脑的网关然后ping此网关的批处理

1,161次阅读
没有评论

@echo off
set "com=wmic Path Win32_NetworkAdapterConfiguration where"IPEnabled='True'" get DefaultIPGateway /value"for /f tokens^=2delims^=^" %%a in ('%com%') do set "gwip=%%a"&ping %%a
pause

正文完
 0
评论(没有评论)
验证码