Trigger python script as soon as a specific USB device is attached to the system

44 Views Asked by At

I have a python script which has to be executed everytime using command line. What i want to try out is as soon as the windows detects a new USB device has plugged in with a specific vendor id and product id , i want to run the script , basically to automate the process on usb plug in

1

There are 1 best solutions below

0
On

Not the full answer but guess this will help you. I suggest you to use C# to run relevant python script by using a library like IronPython. You can use devicechange from winAPI with C# as well.