How to uninstall usb device using c#
c#, device, uninstallation, usb
Solution
Devcon
Got it working by using a commandline tool called devcon, which I then called from code.
Dropped devcon.exe into one of the system paths so it works everywhere.
Devcon: devcon
called: DEVCON Remove usb"MI_01"
then called: DEVCON rescan
code:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "DEVCON";
proc.StartInfo.Arguments = "Remove *usb"*MI_01";
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.Start();
Problem
Please help me to uninstall usb device in window os. When one my usb has been removed from my laptop, my window os remember that have one usb has been added in my laptop, now i want to uninstall it. Like usbdeview software in module "uninstall selected devices". this's link of this soft: http://www.nirsoft.net/utils/usb_devices_view.html