2

I was wondering if there is an option(in c#) to set an event handler which would run each time one of the USB ports are plugged/unplugged.

Filburt
  • 17,626
  • 12
  • 64
  • 115
Amit Lipman
  • 687
  • 7
  • 19
  • 1
    This answer has decent solutions: http://stackoverflow.com/q/6003822/153923 –  Jul 02 '15 at 13:54
  • That duplicate covers USB thumb drives. Replacing creation of `Win32_VolumeChangeEvent` instances with `Win32_PnPEntity` instances will allow any device change – including USB – to be detected. – Richard Nov 11 '15 at 13:50

0 Answers0