{"id":7845,"date":"2017-01-16T16:26:37","date_gmt":"2017-01-16T07:26:37","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=7845"},"modified":"2017-01-25T13:20:31","modified_gmt":"2017-01-25T04:20:31","slug":"os%e3%81%ae%e3%83%90%e3%83%bc%e3%82%b8%e3%83%a7%e3%83%b3%e6%83%85%e5%a0%b1%e3%82%92%e3%82%af%e3%83%aa%e3%83%83%e3%83%97%e3%83%9c%e3%83%bc%e3%83%89%e3%81%ab%e3%82%b3%e3%83%94%e3%83%bc%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=7845","title":{"rendered":"OS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308bVBScript"},"content":{"rendered":"<p>OS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3084\u30d3\u30eb\u30c9\u756a\u53f7\u3092\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u5185\u306b\u66f8\u304f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3044\u3061\u3044\u3061\u30b7\u30b9\u30c6\u30e0\u60c5\u5831\u3092\u898b\u308b\u306e\u306f\u9762\u5012\u304f\u3055\u3044\u306e\u3067\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u76f4\u63a5\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/ClipOSVersion_01.jpg\" alt=\"\" width=\"636\" height=\"214\" class=\"alignnone size-full wp-image-7847\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/ClipOSVersion_01.jpg 636w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/ClipOSVersion_01-300x101.jpg 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\n'OS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\r\nPutInClipboardText GetOSVersion()\r\n'WScript.Echo GetOSVersion() '\u78ba\u8a8d\u7528\r\n\r\nPrivate Function GetOSVersion()\r\n  Dim colItems\r\n  Dim itm\r\n  Dim ret\r\n  \r\n  Set colItems = CreateObject(&quot;WbemScripting.SWbemLocator&quot;) _\r\n                   .ConnectServer _\r\n                   .ExecQuery(&quot;Select * From Win32_OperatingSystem&quot;)\r\n  For Each itm In colItems\r\n    ret = &quot;OS\u540d:&quot; &amp; itm.Caption &amp; &quot; &quot; &amp; &quot;\u30d0\u30fc\u30b8\u30e7\u30f3:&quot; &amp; itm.Version &amp; &quot; \u30d3\u30eb\u30c9 &quot; &amp; itm.BuildNumber\r\n  Next\r\n  GetOSVersion = ret\r\nEnd Function\r\n\r\nPublic Sub PutInClipboardText(ByVal str)\r\n'https:\/\/www.ka-net.org\/blog\/?p=1563\r\n  Dim cmd\r\n   \r\n  cmd = &quot;cmd \/c &quot;&quot;echo &quot; &amp; str &amp; &quot;| clip&quot;&quot;&quot;\r\n  CreateObject(&quot;WScript.Shell&quot;).Run cmd, 0\r\nEnd Sub<\/pre>\n<p>\u6587\u5b57\u5217\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308b\u51e6\u7406\u306f\u3001\u4e0b\u8a18\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u3092\u305d\u306e\u307e\u307e\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=1563\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-VBScript-120x120.png' alt='clip\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u6587\u5b57\u5217\u3092\u30b3\u30d4\u30fc\u3059\u308bVBScript' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2012.04.03<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=1563\">clip\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u6587\u5b57\u5217\u3092\u30b3\u30d4\u30fc\u3059\u308bVBScript <\/a><\/div><div class=\"cardlink_excerpt\">clip\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u6587\u5b57\u5217\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308bVBScript\u3067\u3059\u3002\r\n\r\n[vb]Option Explicit\r\n\r\nDim s\r\n\r\ns = &quot;\u3053\u3093\u306b\u3061\u306f&quot; &amp; vbTab &amp; &quot;&quot;&...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<h4 class=\"style4a\">\u95a2\u9023\u8a18\u4e8b<\/h4>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7849\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge-120x120.png' alt='Microsoft Edge\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308bVBScript' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2017.01.17<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7849\">Microsoft Edge\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308bVBScript <\/a><\/div><div class=\"cardlink_excerpt\">\u524d\u56de\u306e\u8a18\u4e8b\u306b\u5f15\u304d\u7d9a\u304d\u3001\u81ea\u5206\u306e\u624b\u9593\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3001\u4eca\u56de\u306fMicrosoft Edge\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3059\u308bVBScript\u3067\u3059\u3002\r\n\r\n[vb]CreateObject(&quot;WScript.Shell&quot;).Run &quot;powe...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7891\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-VBScript-120x120.png' alt='Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u30c0\u30a4\u30a2\u30ed\u30b0\u304b\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308bVBScript' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2017.01.25<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7891\">Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u30c0\u30a4\u30a2\u30ed\u30b0\u304b\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308bVBScript <\/a><\/div><div class=\"cardlink_excerpt\">\u81ea\u5206\u306e\u624b\u9593\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30b7\u30ea\u30fc\u30ba\u3001\u4eca\u56de\u306fWord\u3084Excel\u3068\u3044\u3063\u305f\u3001Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002\r\n\r\n\u901a\u5e38\u3067\u3042\u308c\u3070\u3001\u5404Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eApplication.Version\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u53d6\u5f97\u3067...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"OS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3084\u30d3\u30eb\u30c9\u756a\u53f7\u3092\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u5185\u306b\u66f8\u304f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3044\u3061\u3044\u3061\u30b7\u30b9\u30c6\u30e0\u60c5\u5831\u3092\u898b\u308b\u306e\u306f\u9762\u5012\u304f\u3055\u3044\u306e\u3067\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u76f4\u63a5\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3057\u305f\u3002 Option Explicit  [&hellip;]","protected":false},"author":1,"featured_media":7132,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u3092\u66f8\u304f\u3068\u304d\u7528\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002 [OS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308bVBScript]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[25,6],"tags":[],"class_list":["post-7845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows","category-vbs"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-VBScript.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-22x","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7845","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=7845"}],"version-history":[{"count":3,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7845\/revisions"}],"predecessor-version":[{"id":7895,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7845\/revisions\/7895"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7132"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}