I´m trying to get the "last arrival date" property out of the device manager in vb.net. I tried it already with the Win32_PnPEntity, but this property is not included. Is there another function to get this property?
I need this to check how long a "NI PXI Express Chassis" is already ON. It is connected via Thunderbolt and contains a digital multimeter, which need a warmup time of 30 minutes. So before i start the measurements, i have to check, if the warmup time is already over.
Here is my Code actual Code, but as i said, it doesn´t offers this property:
Dim path As System.Management.ManagementPath = New ManagementPath()
path.Server = "."
path.NamespacePath = "root\CIMV2"
Dim scope As ManagementScope = New ManagementScope(path)
Dim query As ObjectQuery = New ObjectQuery("SELECT * FROM Win32_PnPEntity WHERE Name LIKE 'NI PXI Express Chassis Control Device'")
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher(scope, query)
Dim queryCollection As ManagementObjectCollection = searcher.Get()
Dim m As ManagementObject
For Each m In queryCollection
Console.WriteLine("Device Name : {0}", m("Name"))
Console.WriteLine("Availability : {0}", m("Availability"))
Console.WriteLine("Caption : {0}", m("Caption"))
Console.WriteLine("ClassGuid : {0}", m("ClassGuid"))
Console.WriteLine("CompatibleID : {0}", m("CompatibleID"))
Console.WriteLine("ConfigManagerErrorCode : {0}", m("ConfigManagerErrorCode"))
Console.WriteLine("ConfigManagerUserConfig : {0}", m("ConfigManagerUserConfig"))
Console.WriteLine("CreationClassName : {0}", m("CreationClassName"))
Console.WriteLine("Description : {0}", m("Description"))
Console.WriteLine("DeviceID : {0}", m("DeviceID"))
Console.WriteLine("ErrorCleared : {0}", m("ErrorCleared"))
Console.WriteLine("ErrorDescription : {0}", m("ErrorDescription"))
Console.WriteLine("HardwareID : {0}", m("HardwareID"))
Console.WriteLine("InstallDate : {0:G}", m("InstallDate"))
Console.WriteLine("LastErrorCode : {0}", m("LastErrorCode"))
Console.WriteLine("Manufacturer : {0}", m("Manufacturer"))
Console.WriteLine("Name : {0}", m("Name"))
Console.WriteLine("PNPClass : {0}", m("PNPClass"))
Console.WriteLine("PNPDeviceID : {0}", m("PNPDeviceID"))
Console.WriteLine("PowerManagementCapabilities : {0}", m("PowerManagementCapabilities"))
Console.WriteLine("PowerManagementSupported : {0}", m("PowerManagementSupported"))
Console.WriteLine("Present : {0}", m("Present"))
Console.WriteLine("Service : {0}", m("Service"))
Console.WriteLine("Status : {0}", m("Status"))
Console.WriteLine("StatusInfo : {0}", m("StatusInfo"))
Console.WriteLine("SystemCreationClassName : {0}", m("SystemCreationClassName"))
Console.WriteLine("SystemName : {0}", m("SystemName"))
Next
Console.ReadLine()
The property i need:
Thanks for your help.