Batch script to check for network status?
I have a script to launch a few apps when Windows starts, but I want to pause if the WiFi isn't connected yet. I written this, but it doesn't trigger when the network is up.
@echo on
setlocal
set /A cnt = 0
:networkLoop
ping
www.google.pt -n 1 -w 1000 1>nul: 2>nul:
echo Errorlevel: %errorlevel%
if errorlevel 1 goto networkRetry else goto networkOK
:networkRetry
set /A cnt+=1
ECHO Network not OK (pass %cnt%) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if /I %cnt%...