我有两个设备连接到我的计算机,显示为:
MOXA USB Serial Port (COM10)
MOXA USB Serial Port (COM2)
在设备管理器的端口下,当我单击第一个时,属性窗口显示“位置:在 UPort 1130 上”,第二个显示“位置:在 UPort 1110 上”
我需要能够使用命令提示符来区分哪个是哪个(1110 与 1130)。
我尝试过这个,但它并没有给我我需要的信息。
C:\Users\myuser>wmic path CIM_LogicalDevice where "Description like 'MOXA%'" get /value
Availability=
Caption=MOXA USB Serial Port (COM2)
ClassGuid={4d36e978-e325-11ce-bfc1-08002be10318}
CompatibleID=
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
CreationClassName=Win32_PnPEntity
Description=MOXA USB Serial Port
DeviceID=MXUPORT\COM\6&19BDFBDE&4&0000
ErrorCleared=
ErrorDescription=
HardwareID={"mxuport\com"}
InstallDate=
LastErrorCode=
Manufacturer=Moxa Inc.
Name=MOXA USB Serial Port (COM2)
PNPClass=Ports
PNPDeviceID=MXUPORT\COM\6&19BDFBDE&4&0000
PowerManagementCapabilities=
PowerManagementSupported=
Present=TRUE
Service=mxuwdrv2
Status=OK
StatusInfo=
SystemCreationClassName=Win32_ComputerSystem
SystemName=INI-NO-PF0TMQDZ
Availability=
Caption=MOXA USB Serial Port (COM10)
ClassGuid={4d36e978-e325-11ce-bfc1-08002be10318}
CompatibleID=
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
CreationClassName=Win32_PnPEntity
Description=MOXA USB Serial Port
DeviceID=MXUPORT\COM\6&3F0A0B3&0&0000
ErrorCleared=
ErrorDescription=
HardwareID={"mxuport\com"}
InstallDate=
LastErrorCode=
Manufacturer=Moxa Inc.
Name=MOXA USB Serial Port (COM10)
PNPClass=Ports
PNPDeviceID=MXUPORT\COM\6&3F0A0B3&0&0000
PowerManagementCapabilities=
PowerManagementSupported=
Present=TRUE
Service=mxuwdrv2
Status=OK
StatusInfo=
SystemCreationClassName=Win32_ComputerSystem
SystemName=INI-NO-PF0TMQDZ
我也尝试过这个,但它也没有真正满足我的需要。
C:\Users\myuser>reg query HKLM\HARDWARE\DEVICEMAP\SERIALCOMM
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
\Device\mxuport0 REG_SZ COM2
\Device\mxuport1 REG_SZ COM10