Detecting Internet connection in Windows XP.
As promised, here is the Internet Apps loader for Windows XP.
@echo off
ping -n 1 www.google.co.uk
If %errorlevel%==0 GOTO programs
goto end:programs
echo Starting Pidgin.
start pidgin
echo Starting Skype.
start c:\Progra~1\Skype\Phone\Skype.exe:end
exit
Basically it’s the same script with a few changes since the languages are different. The start command loads programs in the same way the trailing & did in Linux and allows the batch file to close at the end and not take up memory.
The @echo off simply prevents excessive text from popping up while the batch file runs.
The main difference is the procedure like layout. The If statement sends it strait to the programs procedure if there’s a connection, otherwise strait to the end.
To make this load on startup, put the .bat file somewhere sensible like in the windows folder, then create a shortcut to it in your startup folder in start menu.
UPDATE: Have made an updated version of this script, available here.



As stated in the Linux version of this statement. I had issues with the script not working because the wireless failing to log on in time. Well, the exact same method to fix the problem is possible in Windows. The command sleep 15 was inserted after @echo off to give a 15 second pause to allow the wireless card to connect. Final code below.
@echo off
sleep 15
ping -n 1 http://www.google.co.uk
If %errorlevel%==0 GOTO programs
goto end
:programs
start pidgin
start c:\Progra~1\Skype\Phone\Skype.exe
:end
exit