who knows how can i detect a 3G USB KEY using c#
the key that i_ have is Huawi 3G mobilis key
i tried the ManagementObjectSearcher(“root\CIMV2″,”SELECT * FROM POTSModem/and PnpEntity”) yet i didn’t find it
i tried the NetworkInterface search function,i found it but it was under the name Ethernet 2 and my project requires 3 keys so configuring it for each and every PC would be a problem and time consuming
please help me find a solution


try to explore available wmi queries (and responses) using wmi code creator or check what’s displayed in windows device manager and try to google appropriate win API function (p/invoke) to list devices
Thank you very much , i will try to learn the wmi code creator and i hope i can find what i am looking for
This is likely what you’re looking for:
https://docs.microsoft.com/en-us/uwp/api/Windows.Devices.Enumeration.DeviceWatcher?view=winrt-19041
You can use this to enumerate current devices and react to addition / removal of devices.
Tahnk you very much i will try to understand it and i hope that it could get me to my destination
C# devs
null reference exceptions

source