0

This is my first question. In addition, I am a Japanese who has not mastered English, so please be kind.(By the way, most of these sentences are made using Google Translate.)

I want to get the device in "Devices and Printers".For example, I want to get the device name such as "ATH-CKR35BT", "ERGO M575", "Xperia Z5".(Not the device ID). In the case of a printer, I could easily get it using System.Drawing.Printing. But I don't know how to get the device. I want to get the device in "Devices And Printer"

I tried using WMI's WQL to get these, but didn't get the information I wanted. I also tried the Setup API, but couldn't find what I needed. I searched for this for two days, but I couldn't find anything.I don't know what to do anymore.So I asked.

Is it possible to get the device of "Devices and Printers"? If you can get it, please tell me the specific method.

  • Check this [get-list-of-connected-usb-devices](https://stackoverflow.com/questions/3331043/get-list-of-connected-usb-devices) – Genusatplay Oct 19 '21 at 13:27
  • Which of the eight answers should I check? – Shiranui Oct 19 '21 at 13:42
  • Just read all answers, all of them is part of full question understanding. – Genusatplay Oct 19 '21 at 14:17
  • I tested those methods, but didn't get what I wanted. They give the device ID and the name that will appear in Device Manager.Not what I want to get. – Shiranui Oct 20 '21 at 03:51
  • I test it too and `Win32_PnPEntity` property `Name` retrun correct name. For example powershell selection with query `(Get-WmiObject "Win32_PnPEntity" | Where-Object {$_.PNPDeviceId -like "USB*" -and $_.Name -notlike "*USB*"}).Name` return my phone correctly. – Genusatplay Oct 20 '21 at 09:08
  • https://stackoverflow.com/questions/3438366/setupdigetdeviceproperty-usage-example When I tried this as a reference, the result obtained by "DEVPKEY_Device_BusReportedDeviceDesc" was close to what I was looking for. – Shiranui Oct 20 '21 at 14:52
  • Thank you very much! – Shiranui Oct 20 '21 at 14:52

0 Answers0