1 2 3 4 |
@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 |
1 2 3 4 |
@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 |