LastErrorCode - property in ROOT\CIMV2\ms_409 namespace

LastErrorCode in other namespaces

List of classes with LastErrorCode local property in ROOT\CIMV2\ms_409 namespace

propertyClassOrigin
LastErrorCodeCIM_LogicalDeviceCIM_LogicalDevice

List of classes with LastErrorCode derived property in ROOT\CIMV2\ms_409 namespace

propertyClassOrigin
LastErrorCodeCIM_AggregatePExtentCIM_LogicalDevice
LastErrorCodeCIM_AggregatePSExtentCIM_LogicalDevice
LastErrorCodeCIM_AlarmDeviceCIM_LogicalDevice
LastErrorCodeCIM_BatteryCIM_LogicalDevice
LastErrorCodeCIM_BinarySensorCIM_LogicalDevice
LastErrorCodeCIM_CacheMemoryCIM_LogicalDevice
LastErrorCodeCIM_CDROMDriveCIM_LogicalDevice
LastErrorCodeCIM_ControllerCIM_LogicalDevice
LastErrorCodeCIM_CoolingDeviceCIM_LogicalDevice
LastErrorCodeCIM_CurrentSensorCIM_LogicalDevice
LastErrorCodeCIM_DesktopMonitorCIM_LogicalDevice
LastErrorCodeCIM_DiscreteSensorCIM_LogicalDevice
LastErrorCodeCIM_DiskDriveCIM_LogicalDevice
LastErrorCodeCIM_DisketteDriveCIM_LogicalDevice
LastErrorCodeCIM_DiskPartitionCIM_LogicalDevice
LastErrorCodeCIM_DisplayCIM_LogicalDevice
LastErrorCodeCIM_FanCIM_LogicalDevice
LastErrorCodeCIM_FlatPanelCIM_LogicalDevice
LastErrorCodeCIM_HeatPipeCIM_LogicalDevice
LastErrorCodeCIM_InfraredControllerCIM_LogicalDevice
LastErrorCodeCIM_KeyboardCIM_LogicalDevice
LastErrorCodeCIM_LogicalDiskCIM_LogicalDevice
LastErrorCodeCIM_MagnetoOpticalDriveCIM_LogicalDevice
LastErrorCodeCIM_ManagementControllerCIM_LogicalDevice
LastErrorCodeCIM_MediaAccessDeviceCIM_LogicalDevice
LastErrorCodeCIM_MemoryCIM_LogicalDevice
LastErrorCodeCIM_MultiStateSensorCIM_LogicalDevice
LastErrorCodeCIM_NetworkAdapterCIM_LogicalDevice
LastErrorCodeCIM_NonVolatileStorageCIM_LogicalDevice
LastErrorCodeCIM_NumericSensorCIM_LogicalDevice
LastErrorCodeCIM_ParallelControllerCIM_LogicalDevice
LastErrorCodeCIM_PCIControllerCIM_LogicalDevice
LastErrorCodeCIM_PCMCIAControllerCIM_LogicalDevice
LastErrorCodeCIM_PCVideoControllerCIM_LogicalDevice
LastErrorCodeCIM_PhysicalExtentCIM_LogicalDevice
LastErrorCodeCIM_PointingDeviceCIM_LogicalDevice
LastErrorCodeCIM_PotsModemCIM_LogicalDevice
LastErrorCodeCIM_PowerSupplyCIM_LogicalDevice
LastErrorCodeCIM_PrinterCIM_LogicalDevice
LastErrorCodeCIM_ProcessorCIM_LogicalDevice
LastErrorCodeCIM_ProtectedSpaceExtentCIM_LogicalDevice
LastErrorCodeCIM_RefrigerationCIM_LogicalDevice
LastErrorCodeCIM_ScannerCIM_LogicalDevice
LastErrorCodeCIM_SCSIControllerCIM_LogicalDevice
LastErrorCodeCIM_SensorCIM_LogicalDevice
LastErrorCodeCIM_SerialControllerCIM_LogicalDevice
LastErrorCodeCIM_StorageExtentCIM_LogicalDevice
LastErrorCodeCIM_StorageVolumeCIM_LogicalDevice
LastErrorCodeCIM_TachometerCIM_LogicalDevice
LastErrorCodeCIM_TapeDriveCIM_LogicalDevice
LastErrorCodeCIM_TemperatureSensorCIM_LogicalDevice
LastErrorCodeCIM_UninterruptiblePowerSupplyCIM_LogicalDevice
LastErrorCodeCIM_USBControllerCIM_LogicalDevice
LastErrorCodeCIM_USBDeviceCIM_LogicalDevice
LastErrorCodeCIM_USBHubCIM_LogicalDevice
LastErrorCodeCIM_UserDeviceCIM_LogicalDevice
LastErrorCodeCIM_VideoControllerCIM_LogicalDevice
LastErrorCodeCIM_VolatileStorageCIM_LogicalDevice
LastErrorCodeCIM_VoltageSensorCIM_LogicalDevice
LastErrorCodeCIM_VolumeSetCIM_LogicalDevice
LastErrorCodeCIM_WORMDriveCIM_LogicalDevice
LastErrorCodeWin32_1394ControllerCIM_LogicalDevice
LastErrorCodeWin32_BatteryCIM_LogicalDevice
LastErrorCodeWin32_BusCIM_LogicalDevice
LastErrorCodeWin32_CacheMemoryCIM_LogicalDevice
LastErrorCodeWin32_CDROMDriveCIM_LogicalDevice
LastErrorCodeWin32_CurrentProbeCIM_LogicalDevice
LastErrorCodeWin32_DesktopMonitorCIM_LogicalDevice
LastErrorCodeWin32_DiskDriveCIM_LogicalDevice
LastErrorCodeWin32_DiskPartitionCIM_LogicalDevice
LastErrorCodeWin32_FanCIM_LogicalDevice
LastErrorCodeWin32_FloppyControllerCIM_LogicalDevice
LastErrorCodeWin32_FloppyDriveCIM_LogicalDevice
LastErrorCodeWin32_HeatPipeCIM_LogicalDevice
LastErrorCodeWin32_IDEControllerCIM_LogicalDevice
LastErrorCodeWin32_InfraredDeviceCIM_LogicalDevice
LastErrorCodeWin32_KeyboardCIM_LogicalDevice
LastErrorCodeWin32_LogicalDiskCIM_LogicalDevice
LastErrorCodeWin32_MappedLogicalDiskCIM_LogicalDevice
LastErrorCodeWin32_MemoryArrayCIM_LogicalDevice
LastErrorCodeWin32_MemoryDeviceCIM_LogicalDevice
LastErrorCodeWin32_MotherboardDeviceCIM_LogicalDevice
LastErrorCodeWin32_NetworkAdapterCIM_LogicalDevice
LastErrorCodeWin32_ParallelPortCIM_LogicalDevice
LastErrorCodeWin32_PCMCIAControllerCIM_LogicalDevice
LastErrorCodeWin32_PnPEntityCIM_LogicalDevice
LastErrorCodeWin32_PointingDeviceCIM_LogicalDevice
LastErrorCodeWin32_PortableBatteryCIM_LogicalDevice
LastErrorCodeWin32_POTSModemCIM_LogicalDevice
LastErrorCodeWin32_ProcessorCIM_LogicalDevice
LastErrorCodeWin32_RefrigerationCIM_LogicalDevice
LastErrorCodeWin32_SCSIControllerCIM_LogicalDevice
LastErrorCodeWin32_SerialPortCIM_LogicalDevice
LastErrorCodeWin32_SMBIOSMemoryCIM_LogicalDevice
LastErrorCodeWin32_SoundDeviceCIM_LogicalDevice
LastErrorCodeWin32_TapeDriveCIM_LogicalDevice
LastErrorCodeWin32_TemperatureProbeCIM_LogicalDevice
LastErrorCodeWin32_USBControllerCIM_LogicalDevice
LastErrorCodeWin32_USBHubCIM_LogicalDevice
LastErrorCodeWin32_VideoControllerCIM_LogicalDevice
LastErrorCodeWin32_VoltageProbeCIM_LogicalDevice
LastErrorCodeWin32_VolumeCIM_LogicalDevice

Code samples for LastErrorCode property

Get instance of WMI class using GetObject, LastErrorCode property of CIM_Printer

Short VBS code - get a single specified instance of CIM_Printer class or get a default unnamed instance (singleton) of the class, using one single command GetObject with exact path of the wmi object.

'https://wutils.com/wmi/
Dim wmiObject
Set wmiObject = GetObject( _
 "WINMGMTS:\\.\ROOT\CIMV2\ms_409:" + _
 "CIM_Printer.PropertyName=""SomeText""")
Wscript.Echo wmiObject.LastErrorCode 'or other property name, see properties
See more VBS samples of CIM_Printer class

WMI query - sample windows WQL with C#, LastErrorCode property of CIM_Printer

Get a specified instance of CIM_Printer by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this c# sample code.
See in another language: VBScript, VB.Net.
//https://wutils.com/wmi/

//Project -> Add reference -> System.Management
//using System.Management;

//create a management scope object
ManagementScope scope = new ManagementScope("\\\\.\\ROOT\\CIMV2\\ms_409");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM CIM_Printer Where PropertyName=\"SomeText\"");

//create object searcher
ManagementObjectSearcher searcher =
                        new ManagementObjectSearcher(scope, query);

//get a collection of WMI objects
ManagementObjectCollection queryCollection = searcher.Get();

//enumerate the collection.
foreach (ManagementObject m in queryCollection) 
{
  // access properties of the WMI object
  Console.WriteLine("LastErrorCode : {0}", m["LastErrorCode"]);
  
}

WMI query - sample windows WQL with VB.Net, LastErrorCode property of CIM_Printer

Get a specified instance of CIM_Printer by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this VB.Net sample code.
See in another language: VBScript, C#
'Project -> Add reference -> System.Management
'Imports System.Management

'Get the namespace management scope
Dim Scope As New ManagementScope("\\.\ROOT\CIMV2\ms_409")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM CIM_Printer Where PropertyName="SomeText"")

'Create object searcher
Dim Searcher As New ManagementObjectSearcher(Scope, Query)

'Get a collection of WMI objects
Dim queryCollection As ManagementObjectCollection = Searcher.Get

'Enumerate wmi object 
For Each mObject As ManagementObject In queryCollection
  'write out some property value
  Console.WriteLine("LastErrorCode : {0}", mObject("LastErrorCode"))
Next
comments powered by Disqus
WUtils.com