13

I have a physical device object name, e.g. "\Device\0000007c".

In Windows 7, how do I find what device corresponds to that ID short of going through every device in my system in Device Manager, one at a time, opening the properties dialog and looking at the Physical Device Object Name entry?

I found Find device in Windows based on Physical Device Object (PDO) identifiers but that turned out to be a bit of an XY problem and doesn't answer this question.

I tried searching the registry (keys/values/data) for the string "0000007c", "0000007C", and the dword 0x0000007C but could not find anything related to devices.

In older Windows you could print a full report from Device Manager (which I could then search), but in Windows 7 the Device Manager no longer has this option.

4
  • You could search the object name in the registry, and then inspect the parent/child keys to get additional information.
    – and31415
    Jul 19, 2014 at 10:31
  • @and31415 I already tried that but could not find anything; I'll update the question.
    – Jason C
    Jul 19, 2014 at 10:41
  • 2
    Try running the following command from a command prompt, and post here the output: wmic path Win32_PnPSignedDriver where "pdo like '%0000007c'" get devicename,pdo
    – and31415
    Jul 19, 2014 at 18:17
  • @and31415 Just tried it; it worked!
    – Jason C
    Jul 29, 2014 at 16:55

2 Answers 2

12

Solution

From the official documentation:

When a bus driver detects that child devices have been plugged in or unplugged, it informs the Plug and Play (PnP) manager. In response, the PnP manager asks the bus driver to create a physical device object (PDO) for each child device that is connected to the parent device (that is, the bus).

Source: WDM Concepts for WDF Drivers

To get the required information, open a command prompt and run the following command:

wmic path Win32_PnPSignedDriver where "pdo like '%0000007c'" get devicename,pdo

Further reading

2

If this is for a Physical Disk, you can use the following Powershell Core script lines to figure out the actual disk that is being identified by the obscure PDO name:

# Starting with a PDO name, likely copy-pasta'd from some obscure warning/error message
$pdo_name='\Device\0000005b'

# Step 1
$system_element_dev_id = Get-CimInstance Win32_PnPSignedDriver |
                           ? {$_.PDO -eq $pdo_name} |
                           Select-Object -ExpandProperty DeviceID

# Step 2: Use the proceeds from the above transaction to identify the "Disk Number"
$phys_disk_num = Get-CimInstance Win32_PNPDevice |
                   ? {[string]$_.SystemElement.DeviceID -eq $system_element_dev_id} |
                   Select-Object @{
                     n='disk_number';
                     e={[int]$_.SameElement.DeviceID.replace('\\.\PHYSICALDRIVE','')}
                   } |
                   Select-Object -expand disk_number

# Step 3: Profit! Get the info you were after
Get-PhysicalDisk | ? {$_.DeviceId -eq $phys_disk_num}

Sample output, with the serial number obscured and some columns/values abbreviated to avoid the dreaded horizontal scrollbar:

Num FriendlyName  SerialNumber MediaType CanPool OpStatus HealthStat Usage        Size
--- ------------  ------------ --------- ------- -------- ---------- -----        ----
5   ST16000NM001G ZL123XYZ     HDD       False   OK       Healthy    Auto-Sel 14.55 TB

Hacking the above script for a device type that is not a Physical Disk will be left as an exercise for the reader.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .