Is there a way to find out when in a LAN anyone plugs in a pendrive to the USB port? Programatically (in C# preferably) or through some tool. Basically I\'d imagine a clien
Also check out the registry where all information is stored about the usb devices. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
You can hook into changes of that key in the registry and act upon that.
This free utility are a big help when pooking around: http://www.nirsoft.net/utils/usb_devices_view.html
You can select a usb-drive, choose to open the registry key for that drive and enable/disable the device and a lot more.
In the registry you can see if the device is connected, if it's of massstorage type and other interresting information. Its easy to filter the regkeys to just get usb-massstorage drives and then hook into and wait for changes (connect/disconnect).
With Windows Management Instrumentation you can register to recieve Registry events: http://msdn.microsoft.com/en-us/library/aa393035(VS.85).aspx
Check out System.Management in .Net