Reputation: 121
There is a way to Removes ghost devices from your system in C#? I have try with "ManagementObjectSearcher" with "From Win32_Device" or "Win32_PnPEntity" but with not success. Thanks
With powerShell there is this command:
Get-PnpDevice -class "Ports" -status unknown
I have to execute it in c# and I have to remove the "unknown" devices
Upvotes: 0
Views: 315
Reputation: 382
You can loop between every port at the startup and try to open it, so you can identify which one exist and it's available. Related answer
Upvotes: 1