Hi!
Have been looking for several days now how to use the wmi.get function for an item, which would look for a printer's DeviceID and return the Status.
What I've tried so far:
I've even tried to use the full path for the USB device on a single machine, including the S/N, to no avail. Here's the instance of interest as per WMI explorer output:
Have been looking for several days now how to use the wmi.get function for an item, which would look for a printer's DeviceID and return the Status.
What I've tried so far:
Code:
wmi.get[root\cimv2,SELECT Status FROM Win32_PnPEntity WHERE DeviceID LIKE %\\VID_04B8&PID_0202\\%]
Code:
wmi.get[root\cimv2,SELECT Status FROM Win32_PnPEntity WHERE DeviceID LIKE %VID_04B8&PID_0202\\%]
Code:
wmi.get[root\cimv2,SELECT Status FROM Win32_PnPEntity WHERE DeviceID=USB\\VID_04B8&PID_0202\\%]
Code:
wmi.get[root\cimv2,SELECT Status FROM Win32_PnPEntity WHERE DeviceID="USB\\VID_04B8&PID_0202\\%"]
Code:
wmi.get[root\cimv2,SELECT Status FROM Win32_PnPEntity.DeviceID=USB\\VID_04B8&PID_0202\\%]
Code:
instance of Win32_PnPEntity
{
Caption = "EPSON USB Controller for TM/BA/EU Printers";
ClassGuid = "{36fc9e60-c465-11cf-8056-444553540000}";
CompatibleID = {"USB\\Class_ff&SubClass_ff&Prot_02", "USB\\Class_ff&SubClass_ff", "USB\\Class_ff"};
ConfigManagerErrorCode = 0;
ConfigManagerUserConfig = FALSE;
CreationClassName = "Win32_PnPEntity";
Description = "EPSON USB Controller for TM/BA/EU Printers";
DeviceID = "USB\\VID_04B8&PID_0202\\544357460039060000";
HardwareID = {"USB\\VID_04B8&PID_0202&REV_0100", "USB\\VID_04B8&PID_0202"};
Manufacturer = "EPSON";
Name = "EPSON USB Controller for TM/BA/EU Printers";
PNPDeviceID = "USB\\VID_04B8&PID_0202\\544357460039060000";
Service = "TMUSB";
Status = "OK";
SystemCreationClassName = "Win32_ComputerSystem";
SystemName = "POSUS01001-08";
};

Comment