Example #1
0
        public static string GetActiveMacAddress()
        {
            string property  = "MACAddress";
            string condition = "IPEnabled = TRUE";

            return(WmiInstance.PropertyQuery <string>("Win32_NetworkAdapterConfiguration", property, condition));
        }
Example #2
0
        // Token: 0x06000C2F RID: 3119 RVA: 0x00024524 File Offset: 0x00022724
        public static T PropertyQuery <T>(string wmiclass, string property, string condition, ManagementScope scope = null)
        {
            WmiInstanceProperty wmiInstanceProperty = WmiInstance.PropertyQuery(wmiclass, property, condition, scope);

            if (wmiInstanceProperty.Value != null)
            {
                return((T)((object)wmiInstanceProperty.Value));
            }
            return(default(T));
        }
Example #3
0
 public static string GetBootDevice()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "BootDevice"));
 }
Example #4
0
 public static DateTime?GetLocalDateTime()
 {
     return(WmiInstance.PropertyQuery <DateTime?>("Win32_OperatingSystem", "LocalDateTime"));
 }
Example #5
0
 public static string GetSerialNumber()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "SerialNumber"));
 }
Example #6
0
 public static string GetCaption()
 {
     return(ClearRussian(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "Caption")));
 }
Example #7
0
 // Token: 0x06000BF6 RID: 3062 RVA: 0x00009423 File Offset: 0x00007623
 public static string GetSystemDirectory()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "SystemDirectory", null));
 }
Example #8
0
 // Token: 0x06000BDE RID: 3038 RVA: 0x00009344 File Offset: 0x00007544
 public static string GetManufacturer()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_BIOS", "Manufacturer", null));
 }
Example #9
0
 public static uint?GetNumberOfProcesses()
 {
     return(WmiInstance.PropertyQuery <uint?>("Win32_OperatingSystem", "NumberOfProcesses"));
 }
Example #10
0
 // Token: 0x06000BF8 RID: 3064 RVA: 0x00009447 File Offset: 0x00007647
 public static uint?GetNumberOfUsers()
 {
     return(WmiInstance.PropertyQuery <uint?>("Win32_OperatingSystem", "NumberOfUsers", null));
 }
Example #11
0
 // Token: 0x06000C30 RID: 3120 RVA: 0x00009646 File Offset: 0x00007846
 public static T PropertyQuery <T>(string wmiclass, string property, ManagementScope scope = null)
 {
     return(WmiInstance.PropertyQuery <T>(wmiclass, property, null, scope));
 }
Example #12
0
 // Token: 0x06000BDB RID: 3035 RVA: 0x0000930E File Offset: 0x0000750E
 public static string GetCaption()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_BIOS", "Caption", null));
 }
Example #13
0
 // Token: 0x06000BE0 RID: 3040 RVA: 0x00009368 File Offset: 0x00007568
 public static string GetSerialNumber()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_BIOS", "SerialNumber", null));
 }
Example #14
0
 // Token: 0x06000BDF RID: 3039 RVA: 0x00009356 File Offset: 0x00007556
 public static bool?IsPrimaryBios()
 {
     return(WmiInstance.PropertyQuery <bool?>("Win32_BIOS", "PrimaryBIOS", null));
 }
Example #15
0
 public static string GetSystemDrive()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "SystemDrive"));
 }
Example #16
0
 public static string GetWindowsDirectory()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "WindowsDirectory"));
 }
Example #17
0
 // Token: 0x06000BF0 RID: 3056 RVA: 0x000093B7 File Offset: 0x000075B7
 public static DateTime?GetInstallDate()
 {
     return(WmiInstance.PropertyQuery <DateTime?>("Win32_OperatingSystem", "InstallDate", null));
 }
Example #18
0
 // Token: 0x06000BF1 RID: 3057 RVA: 0x000093C9 File Offset: 0x000075C9
 public static DateTime?GetLastBootUpTime()
 {
     return(WmiInstance.PropertyQuery <DateTime?>("Win32_OperatingSystem", "LastBootUpTime", null));
 }
Example #19
0
 // Token: 0x06000BDD RID: 3037 RVA: 0x00009332 File Offset: 0x00007532
 public static string GetName()
 {
     return(WmiInstance.PropertyQuery <string>("Win32_BIOS", "Name", null));
 }