2

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.

1
  • 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
7

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.

2

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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