Hello Efim Zabarsky
I had the same problem as you occurred. To solved it I use Microsoft devcon tool. It will help you to manage yours devices connected to PC. It is work as Microsoft Device Manager. Take a look here:
http://support.microsoft.com/kb/311272 Some code sample how to use this tool:
devconPath declaration:
public string devconPath = Application.StartupPath.ToString();
You can set the path as you wish. The sample above will try to find devcon.exe in application run path.
call method:
Process P = new Process();
ProcessStartInfo DevCon = new ProcessStartInfo(devconPath + "\\devcon\\devcon.exe", "restart =ports *Class_02*");
DevCon.WindowStyle = ProcessWindowStyle.Hidden;
P.StartInfo = DevCon;
P.StartInfo.RedirectStandardOutput = true;
P.StartInfo.UseShellExecute = false;
P.Start();
P.WaitForExit();
As you can see I use command
restart=ports *Class_02* This will
restart all devices with class_02. To find your device class you have
to first run Microsoft Device Manager and find yours device properties. Check properties of device and you will find which class and sub class your device using. You can also do this by devcon.
--
Best Regards
Lucas Specjal