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
  • 16,951
  • 12
  • 63
  • 111
Amit Lipman
  • 595
  • 4
  • 15
  • 1
    This answer has decent solutions: http://stackoverflow.com/q/6003822/153923 – jp2code 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