In this article, I'm going to explain how to run a task as soon as a USB flash drive is connected to a Windows computer. To do this, I'll use the Windows task scheduler, which is triggered when event number 112 appears in the DeviceSetupManager log.
Personally, I use it mainly to run antivirus scan on users computers.
So let's take a detailed look at how to create a Windows task and the parameters to be entered so that it can run a program when a USB flash drive is inserted.
Now, plug in a USB flash drive and check that a scan is running.
Contact :