I'm after a way of running a script (on Windows) when a network connection is established.
Background: I'm looking at the potential of having a low powered computer that sits in the boot of my car storing a lot of audio files, running Subsonic and using the Android app as a "jukebox" controller that plays the music through the soundcard of the computer to an input on the stereo, or broadcasts it over a local radio channel to my car stereo. When I arrive home, it will connect to my home wireless, run a sync with my media server to download any music it hasn't got on it, then hibernate.
My question then, is how can I run the sync when I connect to the network? My current idea is to ping the gateway every 30 minutes or so, and if the gateway is pingable, run the sync and hibernate, or if not ping 30 minutes later.
I would prefer some Windows-based trickery such as batch-based files or PowerShell, but if the OS will run Subsonic then I may consider that as well.
I could have a lot of CD's in my car...but that's effort to remeber to do - I'm ovbiously not a fan of the easy life.