{"id":453,"date":"2011-09-15T19:37:08","date_gmt":"2011-09-15T10:37:08","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=453"},"modified":"2011-09-15T19:38:13","modified_gmt":"2011-09-15T10:38:13","slug":"windows-8wmi%e3%81%a7os%e3%81%ae%e6%83%85%e5%a0%b1%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e3%81%bf%e3%81%be%e3%81%97%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=453","title":{"rendered":"[Windows 8]WMI\u3067OS\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3057\u305f\u3002"},"content":{"rendered":"<p>WMI\u3067Windows 8 Developer Preview(\u82f1\u8a9e\u7248\u30fb64\u30d3\u30c3\u30c8)\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3057\u305f(VBA)\u3002<br \/>\n<!--more--><\/p>\n<h4>\u25a0 VBA\u30b3\u30fc\u30c9<\/h4>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Dim colItems As Object\r\n  Dim itm As Object\r\n  \r\n  On Error Resume Next\r\n  Set colItems = CreateObject(&quot;WbemScripting.SWbemLocator&quot;).ConnectServer.ExecQuery(&quot;Select * from Win32_OperatingSystem&quot;)\r\n  For Each itm In colItems\r\n    Debug.Print &quot;BootDevice:&quot; &amp; itm.BootDevice\r\n    Debug.Print &quot;BuildNumber:&quot; &amp; itm.BuildNumber\r\n    Debug.Print &quot;BuildType:&quot; &amp; itm.BuildType\r\n    Debug.Print &quot;Caption:&quot; &amp; itm.Caption\r\n    Debug.Print &quot;CodeSet:&quot; &amp; itm.CodeSet\r\n    Debug.Print &quot;CountryCode:&quot; &amp; itm.CountryCode\r\n    Debug.Print &quot;CreationClassName:&quot; &amp; itm.CreationClassName\r\n    Debug.Print &quot;CSCreationClassName:&quot; &amp; itm.CSCreationClassName\r\n    Debug.Print &quot;CSDVersion:&quot; &amp; itm.CSDVersion\r\n    Debug.Print &quot;CSName:&quot; &amp; itm.CSName\r\n    Debug.Print &quot;CurrentTimeZone:&quot; &amp; itm.CurrentTimeZone\r\n    Debug.Print &quot;DataExecutionPrevention_32BitApplications:&quot; &amp; itm.DataExecutionPrevention_32BitApplications\r\n    Debug.Print &quot;DataExecutionPrevention_Available:&quot; &amp; itm.DataExecutionPrevention_Available\r\n    Debug.Print &quot;DataExecutionPrevention_Drivers:&quot; &amp; itm.DataExecutionPrevention_Drivers\r\n    Debug.Print &quot;DataExecutionPrevention_SupportPolicy:&quot; &amp; itm.DataExecutionPrevention_SupportPolicy\r\n    Debug.Print &quot;Debug:&quot; &amp; itm.Debug\r\n    Debug.Print &quot;Description:&quot; &amp; itm.Description\r\n    Debug.Print &quot;Distributed:&quot; &amp; itm.Distributed\r\n    Debug.Print &quot;EncryptionLevel:&quot; &amp; itm.EncryptionLevel\r\n    Debug.Print &quot;ForegroundApplicationBoost:&quot; &amp; itm.ForegroundApplicationBoost\r\n    Debug.Print &quot;FreePhysicalMemory:&quot; &amp; itm.FreePhysicalMemory\r\n    Debug.Print &quot;FreeSpaceInPagingFiles:&quot; &amp; itm.FreeSpaceInPagingFiles\r\n    Debug.Print &quot;FreeVirtualMemory:&quot; &amp; itm.FreeVirtualMemory\r\n    Debug.Print &quot;InstallDate:&quot; &amp; itm.InstallDate\r\n    Debug.Print &quot;LargeSystemCache:&quot; &amp; itm.LargeSystemCache\r\n    Debug.Print &quot;LastBootUpTime:&quot; &amp; itm.LastBootUpTime\r\n    Debug.Print &quot;LocalDateTime:&quot; &amp; itm.LocalDateTime\r\n    Debug.Print &quot;Locale:&quot; &amp; itm.Locale\r\n    Debug.Print &quot;Manufacturer:&quot; &amp; itm.Manufacturer\r\n    Debug.Print &quot;MaxNumberOfProcesses:&quot; &amp; itm.MaxNumberOfProcesses\r\n    Debug.Print &quot;MaxProcessMemorySize:&quot; &amp; itm.MaxProcessMemorySize\r\n    Debug.Print &quot;MUILanguages:&quot; &amp; itm.MUILanguages\r\n    Debug.Print &quot;Name:&quot; &amp; itm.Name\r\n    Debug.Print &quot;NumberOfLicensedUsers:&quot; &amp; itm.NumberOfLicensedUsers\r\n    Debug.Print &quot;NumberOfProcesses:&quot; &amp; itm.NumberOfProcesses\r\n    Debug.Print &quot;NumberOfUsers:&quot; &amp; itm.NumberOfUsers\r\n    Debug.Print &quot;OperatingSystemSKU:&quot; &amp; itm.OperatingSystemSKU\r\n    Debug.Print &quot;Organization:&quot; &amp; itm.Organization\r\n    Debug.Print &quot;OSArchitecture:&quot; &amp; itm.OSArchitecture\r\n    Debug.Print &quot;OSLanguage:&quot; &amp; itm.OSLanguage\r\n    Debug.Print &quot;OSProductSuite:&quot; &amp; itm.OSProductSuite\r\n    Debug.Print &quot;OSType:&quot; &amp; itm.OSType\r\n    Debug.Print &quot;OtherTypeDescription:&quot; &amp; itm.OtherTypeDescription\r\n    Debug.Print &quot;PAEEnabled:&quot; &amp; itm.PAEEnabled\r\n    Debug.Print &quot;PlusProductID:&quot; &amp; itm.PlusProductID\r\n    Debug.Print &quot;PlusVersionNumber:&quot; &amp; itm.PlusVersionNumber\r\n    Debug.Print &quot;PortableOperatingSystem:&quot; &amp; itm.PortableOperatingSystem\r\n    Debug.Print &quot;Primary:&quot; &amp; itm.Primary\r\n    Debug.Print &quot;ProductType:&quot; &amp; itm.ProductType\r\n    Debug.Print &quot;RegisteredUser:&quot; &amp; itm.RegisteredUser\r\n    Debug.Print &quot;SerialNumber:&quot; &amp; itm.SerialNumber\r\n    Debug.Print &quot;ServicePackMajorVersion:&quot; &amp; itm.ServicePackMajorVersion\r\n    Debug.Print &quot;ServicePackMinorVersion:&quot; &amp; itm.ServicePackMinorVersion\r\n    Debug.Print &quot;SizeStoredInPagingFiles:&quot; &amp; itm.SizeStoredInPagingFiles\r\n    Debug.Print &quot;Status:&quot; &amp; itm.Status\r\n    Debug.Print &quot;SuiteMask:&quot; &amp; itm.SuiteMask\r\n    Debug.Print &quot;SystemDevice:&quot; &amp; itm.SystemDevice\r\n    Debug.Print &quot;SystemDirectory:&quot; &amp; itm.SystemDirectory\r\n    Debug.Print &quot;SystemDrive:&quot; &amp; itm.SystemDrive\r\n    Debug.Print &quot;TotalSwapSpaceSize:&quot; &amp; itm.TotalSwapSpaceSize\r\n    Debug.Print &quot;TotalVirtualMemorySize:&quot; &amp; itm.TotalVirtualMemorySize\r\n    Debug.Print &quot;TotalVisibleMemorySize:&quot; &amp; itm.TotalVisibleMemorySize\r\n    Debug.Print &quot;Version:&quot; &amp; itm.Version\r\n    Debug.Print &quot;WindowsDirectory:&quot; &amp; itm.WindowsDirectory\r\n  Next\r\n  Set colItems = Nothing\r\n  On Error GoTo 0\r\nEnd Sub<\/pre>\n<h4>\u25a0 \u7d50\u679c<\/h4>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">BootDevice:\\Device\\HarddiskVolume1\r\nBuildNumber:8102\r\nBuildType:Multiprocessor Free\r\nCaption:Microsoft Windows Developer Preview \r\nCodeSet:932\r\nCountryCode:81\r\nCreationClassName:Win32_OperatingSystem\r\nCSCreationClassName:Win32_ComputerSystem\r\nCSDVersion:\r\nCSName:WIN8PC\r\nCurrentTimeZone:540\r\nDataExecutionPrevention_32BitApplications:True\r\nDataExecutionPrevention_Available:True\r\nDataExecutionPrevention_Drivers:True\r\nDataExecutionPrevention_SupportPolicy:2\r\nDebug:False\r\nDescription:\r\nDistributed:False\r\nEncryptionLevel:256\r\nForegroundApplicationBoost:2\r\nFreePhysicalMemory:2018972\r\nFreeSpaceInPagingFiles:3210264\r\nFreeVirtualMemory:5132032\r\nInstallDate:20110914232533.000000+540\r\nLargeSystemCache:\r\nLastBootUpTime:20110915164505.493335+540\r\nLocalDateTime:20110915191717.920000+540\r\nLocale:0411\r\nManufacturer:Microsoft Corporation\r\nMaxNumberOfProcesses:-1\r\nMaxProcessMemorySize:8589934464\r\nName:Microsoft Windows Developer Preview |C:\\Windows|\\Device\\Harddisk0\\Partition2\r\nNumberOfLicensedUsers:\r\nNumberOfProcesses:51\r\nNumberOfUsers:2\r\nOperatingSystemSKU:74\r\nOrganization:\r\nOSArchitecture:64-bit\r\nOSLanguage:1033\r\nOSProductSuite:256\r\nOSType:18\r\nOtherTypeDescription:\r\nPAEEnabled:\r\nPlusProductID:\r\nPlusVersionNumber:\r\nPortableOperatingSystem:False\r\nPrimary:True\r\nProductType:1\r\nRegisteredUser:kinuasa\r\nSerialNumber:00127-*****-*****-*****\r\nServicePackMajorVersion:0\r\nServicePackMinorVersion:0\r\nSizeStoredInPagingFiles:3210264\r\nStatus:OK\r\nSuiteMask:272\r\nSystemDevice:\\Device\\HarddiskVolume2\r\nSystemDirectory:C:\\Windows\\system32\r\nSystemDrive:C:\r\nTotalSwapSpaceSize:\r\nTotalVirtualMemorySize:6485064\r\nTotalVisibleMemorySize:3274800\r\nVersion:6.2.8102\r\nWindowsDirectory:C:\\Windows<\/pre>\n","protected":false},"excerpt":{"rendered":"WMI\u3067Windows 8 Developer Preview(\u82f1\u8a9e\u7248\u30fb64\u30d3\u30c3\u30c8)\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u307f\u307e\u3057\u305f(VBA)\u3002","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[25],"tags":[26],"class_list":["post-453","post","type-post","status-publish","format-standard","hentry","category-windows","tag-windows-8"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-7j","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=453"}],"version-history":[{"count":7,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/453\/revisions"}],"predecessor-version":[{"id":460,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/453\/revisions\/460"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}