Thomasian
asked on
Disabling/Enabling Hardware
How can I disable a hardware, then re-enable it through VB6 or VB.NET?
I am using a USB-Serial converter and the problem is it sometimes hangs. The converter will work again by unplugging, then replugging it, or simply by disabling then re-enabling it in the device manager. I want the unit to be disabled and re-enabled automatically after detecting that it's not working.
P.S. I prefer the code to be in VB6 because it is an old application and I prefer not to install .NET Framework just for this function. But if not possible, a code in .NET will do since I really need to get this done.
I am using a USB-Serial converter and the problem is it sometimes hangs. The converter will work again by unplugging, then replugging it, or simply by disabling then re-enabling it in the device manager. I want the unit to be disabled and re-enabled automatically after detecting that it's not working.
P.S. I prefer the code to be in VB6 because it is an old application and I prefer not to install .NET Framework just for this function. But if not possible, a code in .NET will do since I really need to get this done.
Try this way: https://www.experts-exchange.com/questions/23589565/Using-Visual-Basic-how-do-you-programmatically-Disable-Enable-Windows-Device-Manager-a-USB-Flash-Drive.html
ASKER
jpaulino,
Thanks for the link.
We have the same problem but the solution seems to just start/stop the device manager and not the USB flash drive. Don't know why it was accepted though..
Thanks for the link.
We have the same problem but the solution seems to just start/stop the device manager and not the USB flash drive. Don't know why it was accepted though..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks