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

関連記事

  1. Windows 10

    Selenium(C#)でEdgeをいろいろ操作してみた。

    当ブログでも最近よく扱っているMicrosoft Edge、Selen…

  2. Windows関連

    VivoTab RT TF600TにWindows RT 8.1をインストールしました。

    Windows ストアからWindows RT 8.1がダウンロードで…

  3. Windows関連

    OSのバージョン情報をクリップボードにコピーするVBScript

    OSのバージョンやビルド番号をブログの記事内に書くことがあるのですが、…

  4. Windows 10

    【2017年1月版】Microsoft Edgeを操作するVBAマクロ(DOM編)

    「Microsoft Edge VBA 操作」こういったキーワード検索…

  5. Windows 10

    Microsoft Edgeを操作するVBAマクロ(DOM編)

    2017/1/31 追記:一部コードを修正した記事を公開しました。…

  6. Windows 10

    [Windows 10]ペイント 3Dを起動するコマンド

    今回はWindows 10 Creators Updateで追加された…

コメント

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

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

Time limit is exhausted. Please reload CAPTCHA.

最近の記事

アーカイブ

RapidSSL_SEAL-90x50
PAGE TOP