{"id":8422,"date":"2017-05-09T17:47:45","date_gmt":"2017-05-09T08:47:45","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=8422"},"modified":"2017-05-09T17:52:47","modified_gmt":"2017-05-09T08:52:47","slug":"lhaplus%e3%81%ae%e3%83%90%e3%83%bc%e3%82%b8%e3%83%a7%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8bvbscript","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=8422","title":{"rendered":"Lhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3059\u308bVBScript"},"content":{"rendered":"<p>\u304a\u3088\u305d2\u5e74\u3076\u308a\u306b\u5727\u7e2e\u30fb\u89e3\u51cd\u30bd\u30d5\u30c8\u306e\u300c<a href=\"http:\/\/www7a.biglobe.ne.jp\/~schezo\/\" title=\"HoeHoe.com\" target=\"_blank\">Lhaplus<\/a>\u300d\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7(v1.74)\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u4e0b\u8a18\u8a18\u4e8b\u306b\u3042\u308b\u901a\u308a\u3001\u4e3b\u306a\u66f4\u65b0\u5185\u5bb9\u306f\u8106\u5f31\u6027\u5bfe\u7b56\u3067\u3001\u3053\u308c\u307e\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u305fv1.73\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u901f\u3084\u304b\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>Lhaplus \u81ea\u5df1\u89e3\u51cd\u66f8\u5eab\u306b\u304a\u3051\u308b\u4efb\u610f\u306e DLL \u8aad\u307f\u8fbc\u307f\u306e\u8106\u5f31\u6027<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/www7a.biglobe.ne.jp\/~schezo\/JVN61424279_JVN76795694.html\" target=\"_blank\" title=\"Lhaplus \u81ea\u5df1\u89e3\u51cd\u66f8\u5eab\u306b\u304a\u3051\u308b\u4efb\u610f\u306e DLL \u8aad\u307f\u8fbc\u307f\u306e\u8106\u5f31\u6027\">http:\/\/www7a.biglobe.ne.jp\/~schezo\/JVN61424279_JVN76795694.html<\/a><\/li>\n<li>\u5b9a\u756a\u89e3\u51cd\u30fb\u5727\u7e2e\u30bd\u30d5\u30c8\u300cLhaplus\u300dv1.74\u304c\u516c\u958b \uff5e3\u4ef6\u306e\u8106\u5f31\u6027\u3092\u4fee\u6b63 &#8211; \u7a93\u306e\u675c<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/forest.watch.impress.co.jp\/docs\/news\/1058365.html\" target=\"_blank\" title=\"\u5b9a\u756a\u89e3\u51cd\u30fb\u5727\u7e2e\u30bd\u30d5\u30c8\u300cLhaplus\u300dv1.74\u304c\u516c\u958b \uff5e3\u4ef6\u306e\u8106\u5f31\u6027\u3092\u4fee\u6b63 - \u7a93\u306e\u675c\">http:\/\/forest.watch.impress.co.jp\/docs\/news\/1058365.html<\/a><\/li>\n<\/ul>\n<p>\u4eca\u56de\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u969b\u3057\u3001PC\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fLhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h4 class=\"style4a\">Lhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3059\u308bVBScript<\/h4>\n<p>\u4ed5\u7d44\u307f\u306f\u5358\u7d14\u3067\u3001\u30ec\u30b8\u30b9\u30c8\u30ea\u304b\u3089Lhaplus\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092\u8abf\u3079\u3001\u300cLhaplus.exe\u300d\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3001\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<br \/>\n(\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u304c\u53d6\u5f97\u3067\u304d\u306a\u3044\u3001Lhaplus.exe\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3001\u3068\u8a00\u3063\u305f\u5834\u5408\u306b\u306f\u7a7a\u306e\u6587\u5b57\u5217\u304c\u8fd4\u308a\u307e\u3059\u3002)<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Private Function GetLhaplusVersion()\r\n'Lhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u53d6\u5f97\r\n  Dim ret\r\n  Dim install_path\r\n  Const ExeName = &quot;Lhaplus.exe&quot;\r\n  Const RegInstallPath = &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\HoeHoe\\Lhaplus\\InstallPath&quot;\r\n  Const RegInstallPathX86 = &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\HoeHoe\\Lhaplus\\InstallPath&quot;\r\n  \r\n  ret = &quot;&quot;: install_path = &quot;&quot; '\u521d\u671f\u5316\r\n  \r\n  '\u30ec\u30b8\u30b9\u30c8\u30ea\u304b\u3089Lhaplus\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d1\u30b9\u53d6\u5f97\r\n  With CreateObject(&quot;WScript.Shell&quot;)\r\n    On Error Resume Next\r\n    If Isx64() = True Then\r\n      install_path = .RegRead(RegInstallPathX86)\r\n    Else\r\n      install_path = .RegRead(RegInstallPath)\r\n    End If\r\n    On Error GoTo 0\r\n  End With\r\n  \r\n  '&#x5B;Lhaplus.exe]\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u30d0\u30fc\u30b8\u30e7\u30f3\u53d6\u5f97\r\n  If Len(Trim(install_path)) &gt; 0 Then\r\n    install_path = AddPathSeparator(install_path) &amp; ExeName\r\n    With CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n      If .FileExists(install_path) = True Then\r\n        ret = .GetFileVersion(install_path)\r\n      End If\r\n    End With\r\n  End If\r\n  GetLhaplusVersion = ret\r\nEnd Function\r\n\r\nPrivate Function Isx64()\r\n'64\u30d3\u30c3\u30c8\u74b0\u5883\u304b\u3069\u3046\u304b\u3092\u5224\u5225\r\n  Dim colItems\r\n  Dim itm\r\n  Dim ret\r\n   \r\n  ret = False '\u521d\u671f\u5316\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    If InStr(itm.OSArchitecture, &quot;64&quot;) Then\r\n      ret = True\r\n      Exit For\r\n    End If\r\n  Next\r\n  Isx64 = ret\r\nEnd Function\r\n\r\nPrivate Function AddPathSeparator(ByVal s)\r\n  If Right(s, 1) &lt;&gt; ChrW(92) Then s = s &amp; ChrW(92)\r\n  AddPathSeparator = s\r\nEnd Function<\/pre>\n<h4 class=\"style4a\">Lhaplus\u30b5\u30a4\u30ec\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b9\u30af\u30ea\u30d7\u30c8<\/h4>\n<p>\u4e0a\u8a18\u30b9\u30af\u30ea\u30d7\u30c8\u3068<a href=\"https:\/\/www.ka-net.org\/blog\/?p=5503\" title=\"Lhaplus\u306e\u30b5\u30a4\u30ec\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u3053\u306e\u8a18\u4e8b<\/a>\u3067\u66f8\u3044\u3066\u3044\u308b\u30b5\u30a4\u30ec\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3059\u308c\u3070\u3001<span style=\"color: #ff0000; font-weight: bold;\">\u201c\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306eLhaplus\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u4e0a\u66f8\u304d\u30b5\u30a4\u30ec\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u201d<\/span>\u3082\u7c21\u5358\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">'*************************************************************\r\n' Lhaplus\u30b5\u30a4\u30ec\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b9\u30af\u30ea\u30d7\u30c8 \u203b\u8981\u7ba1\u7406\u8005\u6a29\u9650\r\n' \r\n' 2017\/5\/9 @kinuasa\r\n'*************************************************************\r\n\r\nOption Explicit\r\n\r\nDim v, com\r\n\r\n'-----------------------------------------------------------\r\n' \u203b\u74b0\u5883\u306b\u5fdc\u3058\u3066\u8981\u5909\u66f4\r\n'-----------------------------------------------------------\r\nConst latest_version = 1740 '\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3(\u6570\u5024\u306b\u5909\u63db)\r\nConst lpls_path = &quot;\\\\Shared\\sw\\lpls174.exe&quot; '\u914d\u5e03\u7528Lhaplus\u306e\u30d1\u30b9\r\n'-----------------------------------------------------------\r\n\r\nv = GetLhaplusVersion()\r\nIf Len(Trim(v)) &gt; 0 Then\r\n  'MsgBox &quot;\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fLhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a&quot; &amp; v '\u78ba\u8a8d\u7528\r\n  \r\n  '\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u6570\u5024\u306b\u5909\u63db\u3057\u3066\u6bd4\u8f03\r\n  If CInt(Replace(v, &quot;.&quot;, &quot;&quot;)) &lt; latest_version Then\r\n    '\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u4e0a\u66f8\u304d\u30b5\u30a4\u30ec\u30f3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\n    With CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n      If .FileExists(lpls_path) = True Then\r\n        com = &quot;&quot;&quot;&quot; &amp; lpls_path &amp; &quot;&quot;&quot;&quot; &amp; &quot; \/SILENT \/NORESTART&quot;\r\n        CreateObject(&quot;WScript.Shell&quot;).Run com, 1, True\r\n      End If\r\n    End With\r\n  End If\r\nEnd If\r\n\r\nPrivate Function GetLhaplusVersion()\r\n'Lhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u53d6\u5f97\r\n  Dim ret\r\n  Dim install_path\r\n  Const ExeName = &quot;Lhaplus.exe&quot;\r\n  Const RegInstallPath = &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\HoeHoe\\Lhaplus\\InstallPath&quot;\r\n  Const RegInstallPathX86 = &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\HoeHoe\\Lhaplus\\InstallPath&quot;\r\n  \r\n  ret = &quot;&quot;: install_path = &quot;&quot; '\u521d\u671f\u5316\r\n  \r\n  '\u30ec\u30b8\u30b9\u30c8\u30ea\u304b\u3089Lhaplus\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d1\u30b9\u53d6\u5f97\r\n  With CreateObject(&quot;WScript.Shell&quot;)\r\n    On Error Resume Next\r\n    If Isx64() = True Then\r\n      install_path = .RegRead(RegInstallPathX86)\r\n    Else\r\n      install_path = .RegRead(RegInstallPath)\r\n    End If\r\n    On Error GoTo 0\r\n  End With\r\n  \r\n  '&#x5B;Lhaplus.exe]\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u30d0\u30fc\u30b8\u30e7\u30f3\u53d6\u5f97\r\n  If Len(Trim(install_path)) &gt; 0 Then\r\n    install_path = AddPathSeparator(install_path) &amp; ExeName\r\n    With CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n      If .FileExists(install_path) = True Then\r\n        ret = .GetFileVersion(install_path)\r\n      End If\r\n    End With\r\n  End If\r\n  GetLhaplusVersion = ret\r\nEnd Function\r\n\r\nPrivate Function Isx64()\r\n'64\u30d3\u30c3\u30c8\u74b0\u5883\u304b\u3069\u3046\u304b\u3092\u5224\u5225\r\n  Dim colItems\r\n  Dim itm\r\n  Dim ret\r\n   \r\n  ret = False '\u521d\u671f\u5316\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    If InStr(itm.OSArchitecture, &quot;64&quot;) Then\r\n      ret = True\r\n      Exit For\r\n    End If\r\n  Next\r\n  Isx64 = ret\r\nEnd Function\r\n\r\nPrivate Function AddPathSeparator(ByVal s)\r\n  If Right(s, 1) &lt;&gt; ChrW(92) Then s = s &amp; ChrW(92)\r\n  AddPathSeparator = s\r\nEnd Function<\/pre>\n<p>\u8907\u6570\u53f0\u306e\u7aef\u672b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fLhaplus\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u662f\u975e\u3054\u6d3b\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\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":"\u304a\u3088\u305d2\u5e74\u3076\u308a\u306b\u5727\u7e2e\u30fb\u89e3\u51cd\u30bd\u30d5\u30c8\u306e\u300cLhaplus\u300d\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7(v1.74)\u3055\u308c\u307e\u3057\u305f\u3002 \u4e0b\u8a18\u8a18\u4e8b\u306b\u3042\u308b\u901a\u308a\u3001\u4e3b\u306a\u66f4\u65b0\u5185\u5bb9\u306f\u8106\u5f31\u6027\u5bfe\u7b56\u3067\u3001\u3053\u308c\u307e\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u305fv1.73\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u901f\u3084\u304b [&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":"[Lhaplus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\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,125],"tags":[],"class_list":["post-8422","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows","category-vbs","category-clientmanagement"],"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-2bQ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8422","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=8422"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8422\/revisions"}],"predecessor-version":[{"id":8423,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8422\/revisions\/8423"}],"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=8422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}