public Win32_Environment(WmiRecord data) { Name = data.Properties["Name"]; SystemVariable = data.Properties["SystemVariable"]; UserName = data.Properties["UserName"]; VariableValue = data.Properties["VariableValue"]; }
public Win32_Product(WmiRecord data) { AssignmentType = data.Properties["AssignmentType"]; HelpLink = data.Properties["HelpLink"]; HelpTelephone = data.Properties["HelpTelephone"]; IdentifyingNumber = data.Properties["IdentifyingNumber"]; InstallDate = data.Properties["InstallDate"]; InstallLocation = data.Properties["InstallLocation"]; InstallSource = data.Properties["InstallSource"]; InstallState = data.Properties["InstallState"]; Language = data.Properties["Language"]; LocalPackage = data.Properties["LocalPackage"]; Name = data.Properties["Name"]; PackageCache = data.Properties["PackageCache"]; PackageCode = data.Properties["PackageCode"]; PackageName = data.Properties["PackageName"]; ProductID = data.Properties["ProductID"]; RegCompany = data.Properties["RegCompany"]; RegOwner = data.Properties["RegOwner"]; SKUNumber = data.Properties["SKUNumber"]; Transforms = data.Properties["Transforms"]; URLInfoAbout = data.Properties["URLInfoAbout"]; URLUpdateInfo = data.Properties["URLUpdateInfo"]; Vendor = data.Properties["Vendor"]; Version = data.Properties["Version"]; }
public Win32_BIOS(WmiRecord data) { CurrentLanguage = data.Properties["CurrentLanguage"]; Manufacturer = data.Properties["Manufacturer"]; Name = data.Properties["Name"]; PrimaryBIOS = data.Properties["PrimaryBIOS"]; ReleaseDate = data.Properties["ReleaseDate"]; SerialNumber = data.Properties["SerialNumber"]; SMBIOSBIOSVersion = data.Properties["SMBIOSBIOSVersion"]; Version = data.Properties["Version"]; }
public Win32_OperatingSystem(WmiRecord data) { BootDevice = data.Properties["BootDevice"]; BuildNumber = data.Properties["BuildNumber"]; BuildType = data.Properties["BuildType"]; Caption = data.Properties["Caption"]; CodeSet = data.Properties["CodeSet"]; CountryCode = data.Properties["CountryCode"]; CSName = data.Properties["CSName"]; CurrentTimeZone = data.Properties["CurrentTimeZone"]; DataExecutionPrevention_32BitApplications = data.Properties["DataExecutionPrevention_32BitApplications"]; DataExecutionPrevention_Available = data.Properties["DataExecutionPrevention_Available"]; DataExecutionPrevention_Drivers = data.Properties["DataExecutionPrevention_Drivers"]; DataExecutionPrevention_SupportPolicy = data.Properties["DataExecutionPrevention_SupportPolicy"]; Debug = data.Properties["Debug"]; Description = data.Properties["Description"]; Distributed = data.Properties["Distributed"]; EncryptionLevel = data.Properties["EncryptionLevel"]; ForegroundApplicationBoost = data.Properties["ForegroundApplicationBoost"]; InstallDate = data.Properties["InstallDate"]; LastBootUpTime = data.Properties["LastBootUpTime"]; Locale = data.Properties["Locale"]; Manufacturer = data.Properties["Manufacturer"]; MUILanguages = data.Properties["MUILanguages"]; Name = data.Properties["Name"]; NumberOfLicensedUsers = data.Properties["NumberOfLicensedUsers"]; OperatingSystemSKU = data.Properties["OperatingSystemSKU"]; Organization = data.Properties["Organization"]; OSArchitecture = data.Properties["OSArchitecture"]; OSLanguage = data.Properties["OSLanguage"]; OSProductSuite = data.Properties["OSProductSuite"]; OSType = data.Properties["OSType"]; OtherTypeDescription = data.Properties["OtherTypeDescription"]; PortableOperatingSystem = data.Properties["PortableOperatingSystem"]; Primary = data.Properties["Primary"]; ProductType = data.Properties["ProductType"]; RegisteredUser = data.Properties["RegisteredUser"]; SerialNumber = data.Properties["SerialNumber"]; ServicePackMajorVersion = data.Properties["ServicePackMajorVersion"]; ServicePackMinorVersion = data.Properties["ServicePackMinorVersion"]; Status = data.Properties["Status"]; SystemDevice = data.Properties["SystemDevice"]; SystemDirectory = data.Properties["SystemDirectory"]; SystemDrive = data.Properties["SystemDrive"]; Version = data.Properties["Version"]; WindowsDirectory = data.Properties["WindowsDirectory"]; }
private async void CollectWmiClass(string wmiClass, string members) { Items.Clear(); foreach (ManagementObject managementObject in WmiList.GetCollection(wmiClass, members)) { try { WmiRecord record = new WmiRecord(members); foreach (PropertyData propertyData in managementObject.Properties) { record.ProcessProperty(propertyData); } Items.Add(new Win32_Account(record)); } catch { } } }
public Win32_Account(WmiRecord data) { AccountType = data.Properties["AccountType"]; Caption = data.Properties["Caption"]; Description = data.Properties["Description"]; Disabled = data.Properties["Disabled"]; Domain = data.Properties["Domain"]; FullName = data.Properties["FullName"]; InstallDate = data.Properties["InstallDate"]; LocalAccount = data.Properties["LocalAccount"]; Lockout = data.Properties["Lockout"]; Name = data.Properties["Name"]; PasswordChangeable = data.Properties["PasswordChangeable"]; PasswordExpires = data.Properties["PasswordExpires"]; PasswordRequired = data.Properties["PasswordRequired"]; SID = data.Properties["SID"]; SIDType = data.Properties["SIDType"]; Status = data.Properties["Status"]; }
private void CollectWmiClass(string wmiClass, string members) { Items.Clear(); try { foreach (ManagementObject managementObject in WmiList.GetCollection(wmiClass, members)) { WmiRecord record = new WmiRecord(members); foreach (PropertyData propertyData in managementObject.Properties) { record.ProcessProperty(propertyData); } Items.Add(new Win32_BIOS(record)); } } catch (Exception ex) { MessageBox.Show($"Quering the WMI results in an exception:\n{ex.Message}", "Exception", MessageBoxButton.OK, MessageBoxImage.Exclamation); } }