/// <summary> /// DeviceID from Caption /// </summary> /// <param name="caption">Caption of the Device</param> /// <returns>DeviceID</returns> public string GetDeviceIdFromCaption(string caption) { Wmi TWmi = new Wmi("Win32_DiskDrive", "WHERE Caption='" + caption + "'"); return TWmi.GetInfo("DeviceID"); }
/// <summary> /// Short description of the object /// </summary> /// <param name="tag">Unique identifier for the physical memory device that is represented by an instance of Win32_PhysicalMemory. </param> /// <returns>Caption</returns> public string GetCaptionFromTag(string tag) { Wmi tmp = new Wmi("Win32_PhysicalMemory", "WHERE Tag='" + tag + "'"); return tmp.GetInfo("Caption"); }
public string GetDeviceIdFromCaption(string caption) { Wmi TWmi = new Wmi("Win32_VideoController", "WHERE Caption='" + caption + "'"); return TWmi.GetInfo("DeviceID"); }
public string GetDeviceIdFromCaption(string caption) { Wmi TWmi = new Wmi("Win32_NetworkAdapter", "WHERE Caption='" + caption + "'"); return TWmi.GetInfo("DeviceID"); }