Windows – Run program when USB device is plugged in

backupevent-logwindows 7

I'm not talking about autorun (because I use Windows 7 and understand that this has been disabled now) but a task that I can create that will detect when a certain USB device has been plugged in.

Basically its to operate as a backup. My idea is to create a bunch of profiles using Syncback and use a batch script to run these when my portable hard drive is plugged in. This way I can never forget to backup.

I've got to the part where I can create a new task, and understand it is some sort of event trigger, but I'm not sure which 'log' I need to chose and where to go from there

Best Answer

  • The only flaw with this plan is that it will only occur when the drive is initially plugged in. With SyncBack, you can set scheduled tasks to automatically back up on an interval. If it does not see the drive available then the task scheduled for that day will be omitted and it will be available the next scheduled time.

    To directly answer your question, check out as they may have the solution that you're looking for using Task Scheduler 2 and triggered events.

    http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/task-scheduler-how-to-automatically-synchronize-my/45a49d83-b1d8-4d37-8896-3d2696cf9795