How to check a field/property is existing in Win32_DiskDrive ?
-
Hi everyone, I am using below codes to get information from HardDisk.
ManagementObjectSearcher HardwareQuerySearcher = null;
HardwareQuerySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
foreach (ManagementObject hard in HardwareQuerySearcher.Get())
{
Hard hdd = new Hard();
hdd.Model = hard["Model"].ToString();
hdd.Type = hard["InterfaceType"].ToString();
hdd.Type = hard["SerialNumber"].ToString();
}Do you know how to list/or show all fields/properties that existing in this query ? For example: I am want to know wherether the field "SerialNumber" existing or not ? Thanks and regards, Tai
-
Hi everyone, I am using below codes to get information from HardDisk.
ManagementObjectSearcher HardwareQuerySearcher = null;
HardwareQuerySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
foreach (ManagementObject hard in HardwareQuerySearcher.Get())
{
Hard hdd = new Hard();
hdd.Model = hard["Model"].ToString();
hdd.Type = hard["InterfaceType"].ToString();
hdd.Type = hard["SerialNumber"].ToString();
}Do you know how to list/or show all fields/properties that existing in this query ? For example: I am want to know wherether the field "SerialNumber" existing or not ? Thanks and regards, Tai
have a read of this Win32_DiskDrive class[^]
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
Hi everyone, I am using below codes to get information from HardDisk.
ManagementObjectSearcher HardwareQuerySearcher = null;
HardwareQuerySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
foreach (ManagementObject hard in HardwareQuerySearcher.Get())
{
Hard hdd = new Hard();
hdd.Model = hard["Model"].ToString();
hdd.Type = hard["InterfaceType"].ToString();
hdd.Type = hard["SerialNumber"].ToString();
}Do you know how to list/or show all fields/properties that existing in this query ? For example: I am want to know wherether the field "SerialNumber" existing or not ? Thanks and regards, Tai
-
have a read of this Win32_DiskDrive class[^]
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
-
have a read of this Win32_DiskDrive class[^]
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
Thank you. Do you know what is difference between the property: SerialNumber of "Win32_PhysicalMedia" and SerialNumber of "Win32_DiskDrive" ? When I use Win32_DiskDrive, I can't get SerialNumber on Win XP Regards, Tai
As the Win32_DiskDrive document states, this property is not available on XP
Quote:
SerialNumber Data type: string Access type: Read-only Number allocated by the manufacturer to identify the physical media. Example: WD-WM3493798728 Windows Server 2003 and Windows XP: This property is not available.
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
As the Win32_DiskDrive document states, this property is not available on XP
Quote:
SerialNumber Data type: string Access type: Read-only Number allocated by the manufacturer to identify the physical media. Example: WD-WM3493798728 Windows Server 2003 and Windows XP: This property is not available.
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON