Do an action when a USB is plugged in

We will see here how to run a task as soon as a USB flash drive is plugged in.

I do it mainly to start antivirus scan on users machines.

Create a Windows Task

Run taskschd.msc Windows Task Scheduler create a task

Set parameters

Create a Task Window. Windows Task Scheduler set action. Windows Task Scheduler New action for kaspersky removable drives scan. Windows Task Scheduler New trigger. Windows Task Scheduler New trigger for USB drives action.

Now, plug a USB flash drive and check that a scan is processing.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :