We have a laptop that is primarily used offline, but when it is connected to our network (via ethernet cable), we would like to start a backup application. Is it possible?
The network address is static.
You can create a scheduled task to run a program. In the options there is an option to only start the task if a specific network connection is available.
In the taskoptions, select a trigger and set it to this event data (Event 10000):
In the action tab, select the program you want to run.
Unplug, then re-plug your network cable. Open the Event Viewer, and see if and what event is generated. From there you can attach a task to that event, and the next time it happens your task should fire off.
This is assuming Windows Vista or higher.
Operating under the assumption that when it connects to the network, it also has internet access (though it may work with any network connection, not sure):
Take a look at wait4net.bat.
It is a pretty simple batch file that is executed with:
So you could set that up as a startup script that points to your backup software (or batch file/whatever).
Just tested on Win8x64 and it is still relevant.