Windows関連

[Windows 8]WMIでOSの情報を取得してみました。

WMIでWindows 8 Developer Preview(英語版・64ビット)の情報を取得してみました(VBA)。

■ VBAコード

Option Explicit

Public Sub Sample()
  Dim colItems As Object
  Dim itm As Object
  
  On Error Resume Next
  Set colItems = CreateObject("WbemScripting.SWbemLocator").ConnectServer.ExecQuery("Select * from Win32_OperatingSystem")
  For Each itm In colItems
    Debug.Print "BootDevice:" & itm.BootDevice
    Debug.Print "BuildNumber:" & itm.BuildNumber
    Debug.Print "BuildType:" & itm.BuildType
    Debug.Print "Caption:" & itm.Caption
    Debug.Print "CodeSet:" & itm.CodeSet
    Debug.Print "CountryCode:" & itm.CountryCode
    Debug.Print "CreationClassName:" & itm.CreationClassName
    Debug.Print "CSCreationClassName:" & itm.CSCreationClassName
    Debug.Print "CSDVersion:" & itm.CSDVersion
    Debug.Print "CSName:" & itm.CSName
    Debug.Print "CurrentTimeZone:" & itm.CurrentTimeZone
    Debug.Print "DataExecutionPrevention_32BitApplications:" & itm.DataExecutionPrevention_32BitApplications
    Debug.Print "DataExecutionPrevention_Available:" & itm.DataExecutionPrevention_Available
    Debug.Print "DataExecutionPrevention_Drivers:" & itm.DataExecutionPrevention_Drivers
    Debug.Print "DataExecutionPrevention_SupportPolicy:" & itm.DataExecutionPrevention_SupportPolicy
    Debug.Print "Debug:" & itm.Debug
    Debug.Print "Description:" & itm.Description
    Debug.Print "Distributed:" & itm.Distributed
    Debug.Print "EncryptionLevel:" & itm.EncryptionLevel
    Debug.Print "ForegroundApplicationBoost:" & itm.ForegroundApplicationBoost
    Debug.Print "FreePhysicalMemory:" & itm.FreePhysicalMemory
    Debug.Print "FreeSpaceInPagingFiles:" & itm.FreeSpaceInPagingFiles
    Debug.Print "FreeVirtualMemory:" & itm.FreeVirtualMemory
    Debug.Print "InstallDate:" & itm.InstallDate
    Debug.Print "LargeSystemCache:" & itm.LargeSystemCache
    Debug.Print "LastBootUpTime:" & itm.LastBootUpTime
    Debug.Print "LocalDateTime:" & itm.LocalDateTime
    Debug.Print "Locale:" & itm.Locale
    Debug.Print "Manufacturer:" & itm.Manufacturer
    Debug.Print "MaxNumberOfProcesses:" & itm.MaxNumberOfProcesses
    Debug.Print "MaxProcessMemorySize:" & itm.MaxProcessMemorySize
    Debug.Print "MUILanguages:" & itm.MUILanguages
    Debug.Print "Name:" & itm.Name
    Debug.Print "NumberOfLicensedUsers:" & itm.NumberOfLicensedUsers
    Debug.Print "NumberOfProcesses:" & itm.NumberOfProcesses
    Debug.Print "NumberOfUsers:" & itm.NumberOfUsers
    Debug.Print "OperatingSystemSKU:" & itm.OperatingSystemSKU
    Debug.Print "Organization:" & itm.Organization
    Debug.Print "OSArchitecture:" & itm.OSArchitecture
    Debug.Print "OSLanguage:" & itm.OSLanguage
    Debug.Print "OSProductSuite:" & itm.OSProductSuite
    Debug.Print "OSType:" & itm.OSType
    Debug.Print "OtherTypeDescription:" & itm.OtherTypeDescription
    Debug.Print "PAEEnabled:" & itm.PAEEnabled
    Debug.Print "PlusProductID:" & itm.PlusProductID
    Debug.Print "PlusVersionNumber:" & itm.PlusVersionNumber
    Debug.Print "PortableOperatingSystem:" & itm.PortableOperatingSystem
    Debug.Print "Primary:" & itm.Primary
    Debug.Print "ProductType:" & itm.ProductType
    Debug.Print "RegisteredUser:" & itm.RegisteredUser
    Debug.Print "SerialNumber:" & itm.SerialNumber
    Debug.Print "ServicePackMajorVersion:" & itm.ServicePackMajorVersion
    Debug.Print "ServicePackMinorVersion:" & itm.ServicePackMinorVersion
    Debug.Print "SizeStoredInPagingFiles:" & itm.SizeStoredInPagingFiles
    Debug.Print "Status:" & itm.Status
    Debug.Print "SuiteMask:" & itm.SuiteMask
    Debug.Print "SystemDevice:" & itm.SystemDevice
    Debug.Print "SystemDirectory:" & itm.SystemDirectory
    Debug.Print "SystemDrive:" & itm.SystemDrive
    Debug.Print "TotalSwapSpaceSize:" & itm.TotalSwapSpaceSize
    Debug.Print "TotalVirtualMemorySize:" & itm.TotalVirtualMemorySize
    Debug.Print "TotalVisibleMemorySize:" & itm.TotalVisibleMemorySize
    Debug.Print "Version:" & itm.Version
    Debug.Print "WindowsDirectory:" & itm.WindowsDirectory
  Next
  Set colItems = Nothing
  On Error GoTo 0
End Sub

■ 結果

BootDevice:\Device\HarddiskVolume1
BuildNumber:8102
BuildType:Multiprocessor Free
Caption:Microsoft Windows Developer Preview 
CodeSet:932
CountryCode:81
CreationClassName:Win32_OperatingSystem
CSCreationClassName:Win32_ComputerSystem
CSDVersion:
CSName:WIN8PC
CurrentTimeZone:540
DataExecutionPrevention_32BitApplications:True
DataExecutionPrevention_Available:True
DataExecutionPrevention_Drivers:True
DataExecutionPrevention_SupportPolicy:2
Debug:False
Description:
Distributed:False
EncryptionLevel:256
ForegroundApplicationBoost:2
FreePhysicalMemory:2018972
FreeSpaceInPagingFiles:3210264
FreeVirtualMemory:5132032
InstallDate:20110914232533.000000+540
LargeSystemCache:
LastBootUpTime:20110915164505.493335+540
LocalDateTime:20110915191717.920000+540
Locale:0411
Manufacturer:Microsoft Corporation
MaxNumberOfProcesses:-1
MaxProcessMemorySize:8589934464
Name:Microsoft Windows Developer Preview |C:\Windows|\Device\Harddisk0\Partition2
NumberOfLicensedUsers:
NumberOfProcesses:51
NumberOfUsers:2
OperatingSystemSKU:74
Organization:
OSArchitecture:64-bit
OSLanguage:1033
OSProductSuite:256
OSType:18
OtherTypeDescription:
PAEEnabled:
PlusProductID:
PlusVersionNumber:
PortableOperatingSystem:False
Primary:True
ProductType:1
RegisteredUser:kinuasa
SerialNumber:00127-*****-*****-*****
ServicePackMajorVersion:0
ServicePackMinorVersion:0
SizeStoredInPagingFiles:3210264
Status:OK
SuiteMask:272
SystemDevice:\Device\HarddiskVolume2
SystemDirectory:C:\Windows\system32
SystemDrive:C:
TotalSwapSpaceSize:
TotalVirtualMemorySize:6485064
TotalVisibleMemorySize:3274800
Version:6.2.8102
WindowsDirectory:C:\Windows

[Windows 8]圧縮ファイルを解凍する。前のページ

[Windows 8]シャットダウンはどこ?次のページ

関連記事

  1. Windows関連

    Windows 10 IMEの「クラウド候補機能」の仕組みを追ってみた。

    「ついにWindows 10 日本語IMEにクラウド候補機能が搭載され…

  2. Windows 10

    Windows 10 May 2020 UpdateをISO形式でダウンロードして実機にインストール…

    下記記事にもあるように、5月27日(米国時間)にWindows 10 …

  3. Windows 10

    AppUserModelId(AUMID)を列挙するVBScript

    「「ファイル名を指定して実行」からMicrosoft Edgeを起動す…

  4. Windows 10

    [Windows 10]半期チャネルって何?QUって何?WaaS用語まとめ

    Windows 10がリリースされて早3年、「Windows as a…

コメント

  1. この記事へのコメントはありません。

  1. この記事へのトラックバックはありません。

Time limit is exhausted. Please reload CAPTCHA.

※本ページはプロモーションが含まれています。

Translate

最近の記事

アーカイブ

PAGE TOP