Visual Basic Script


Как получить информацию об операционной системе при помощи WMI - часть 4


Set itmx = ListView1.ListItems.Add(, , "LocalDateTime") dtb = obj.LocalDateTime bias = SplitDateTimeBias(dtb, d, t) itmx.SubItems(1) = Format$(d, "dddd mmm d, yyyy") & " " & _ Format$(t, "hh:mm") & _ " (includes " & bias & " bias)"

Set itmx = ListView1.ListItems.Add(, , "InstallDate") dtb = obj.InstallDate bias = SplitDateTimeBias(dtb, d, t) itmx.SubItems(1) = Format$(d, "dddd mmm d, yyyy") & _ " at " & _ Format$(t, "hh:mm") & _ " (includes " & bias & " bias)"

Set itmx = ListView1.ListItems.Add(, , "LastBootUpTime") dtb = obj.LastBootUpTime bias = SplitDateTimeBias(dtb, d, t) itmx.SubItems(1) = Format$(d, "dddd mmm d, yyyy") & _ " at " & _ Format$(t, "hh:mm") & _ " (includes " & bias & " bias)"

'страна, язык, временная зона

Set itmx = ListView1.ListItems.Add(, , "OSLanguage") itmx.SubItems(1) = obj.OSLanguage Set itmx = ListView1.ListItems.Add(, , "CodeSet") itmx.SubItems(1) = obj.CodeSet Set itmx = ListView1.ListItems.Add(, , "Locale") itmx.SubItems(1) = obj.Locale Set itmx = ListView1.ListItems.Add(, , "CountryCode") itmx.SubItems(1) = obj.CountryCode Set itmx = ListView1.ListItems.Add(, , "CurrentTimeZone") itmx.SubItems(1) = obj.CurrentTimeZone

'информация о использовании памяти

Set itmx = ListView1.ListItems.Add(, , "ForegroundApplicationBoost") Select Case obj.ForegroundApplicationBoost Case 0: msg = "none" Case 1: msg = "minimum" Case 2: msg = "maximum (default)" End Select itmx.SubItems(1) = msg

Set itmx = ListView1.ListItems.Add(, , "TotalVisibleMemorySize") itmx.SubItems(1) = FormatNumber(obj.TotalVisibleMemorySize, 0) Set itmx = ListView1.ListItems.Add(, , "FreePhysicalMemory") itmx.SubItems(1) = FormatNumber(obj.FreePhysicalMemory, 0) Set itmx = ListView1.ListItems.Add(, , "TotalVirtualMemorySize") itmx.SubItems(1) = FormatNumber(obj.TotalVirtualMemorySize, 0) Set itmx = ListView1.ListItems.Add(, , "FreeVirtualMemory") itmx.SubItems(1) = FormatNumber(obj.FreeVirtualMemory, 0) Set itmx = ListView1.ListItems.Add(, , "FreeSpaceInPagingFiles") itmx.SubItems(1) = FormatNumber(obj.FreeSpaceInPagingFiles, 0) Set itmx = ListView1.ListItems.Add(, , "SizeStoredInPagingFiles") itmx.SubItems(1) = FormatNumber(obj.SizeStoredInPagingFiles, 0)




Начало  Назад  Вперед