I'm working on developing a WMI query for my application. It needs to find the assigned virtual COM port for a given VID/PID. My query currently looks like this:
"SELECT DeviceID FROM Win32_SerialPort WHERE PNPDeviceID = \"USB\\VID_10C4&PID_EA60\\0001\""
Based on my research, it should return "COM8"
. However, I'm getting an empty set.
Are string comparisons valid in WQL? As I recall, SQL allows them, but being a subset, I'm not sure if support for them was carried over.
If necessary, I suppose I can query "SELECT DeviceID,PNPDeviceID FROM Win32_SerialPort"
and then in code parse through the results using string compares, but I'd prefer to limit the results in the query, if possible.
Additionally, I was wondering, if string compares are indeed supported in WQL, are they case sensitive, and/or is there a way to specify case?
Thanks.