Batch checking for correct ip-range -
im looking better solution. checking computer if computer online , if in correct network. reason rest of batch need network, , printing log lan printer. se code use today.
@echo off color f8 title wlan check rem maskin pinger www.vg.no :wlancheck ping www.vg.no>nul if errorlevel 1 goto nonet if errorlevel 0 goto gotnet :nonet color cf echo [wlan check][:::::::::failed!::::::::] echo computer has no internet connection echo connect now!!! timeout /t 15 goto wlancheck :gotnet color cf
i use same ping printer.
the best solution me if there way " if connected snid blablabla" goto continue echo not connected please retry.
ipconfig
can used:
ipconfig | find /i "my_wlan_connection_name" >nul && goto continue || echo not connected
replace my_wlan_connection_name
connection name seen in output of ipconfig
when connection established.
Comments
Post a Comment