Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
I don't know and haven't checked, but I think that's definitely possible. Your best bet is probably to look at the task planner. Control panel -> administration tools (approximate translation from French) -> task planner. –  Ariane Apr 16 '13 at 1:26

3 Answers 3

up vote 3 down vote accepted

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):

enter image description here

enter image description here

In the action tab, select the program you want to run.

share|improve this answer

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.

share|improve this answer

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:

wait4net.bat start "explorer.exe"

(where explorer.exe can be whatever you want to be run when a connection is established).

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.