{"id":8411,"date":"2017-05-02T10:42:47","date_gmt":"2017-05-02T01:42:47","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=8411"},"modified":"2017-05-02T10:42:47","modified_gmt":"2017-05-02T01:42:47","slug":"internet-explorer%e3%81%ae%e3%81%8a%e6%b0%97%e3%81%ab%e5%85%a5%e3%82%8a%e3%82%92%e5%88%97%e6%8c%99%e3%81%99%e3%82%8bvbscript","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=8411","title":{"rendered":"Internet Explorer\u306e\u304a\u6c17\u306b\u5165\u308a\u3092\u5217\u6319\u3059\u308bVBScript"},"content":{"rendered":"<p>Internet Explorer\u306e\u304a\u6c17\u306b\u5165\u308a\u306b\u3069\u306e\u4f4d\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u8abf\u3079\u308b\u30b9\u30af\u30ea\u30d7\u30c8(\u5bfe\u5fdc\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\uff1aurl,website)\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nConst CSIDL_FAVORITES = 6\r\n\r\nListIEFavorites CreateObject(&quot;Shell.Application&quot;) _\r\n                  .Namespace(CSIDL_FAVORITES).Self.Path\r\n\r\nPrivate Sub ListIEFavorites(ByVal TargetFolderPath)\r\n  Dim fol, f\r\n   \r\n  With CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n    If .GetFolder(TargetFolderPath).SubFolders.Count &gt; 0 Then\r\n      For Each fol In .GetFolder(TargetFolderPath).SubFolders\r\n        ListIEFavorites fol.Path\r\n      Next\r\n    End If\r\n    If .GetFolder(TargetFolderPath).Files.Count &gt; 0 Then\r\n      For Each f In .GetFolder(TargetFolderPath).Files\r\n        Select Case LCase(.GetExtensionName(f.Path))\r\n          Case &quot;url&quot;\r\n            WScript.Echo f.Path &amp; &quot;,&quot; &amp; GetShortcutTargetPathFromUrl(f.Path)\r\n          Case &quot;website&quot;\r\n            WScript.Echo f.Path &amp; &quot;,&quot; &amp; GetShortcutTargetPathFromWebsite(f.Path)\r\n        End Select\r\n      Next\r\n    End If\r\n  End With\r\nEnd Sub\r\n \r\nPrivate Function GetShortcutTargetPathFromUrl(ByVal TargetFilePath)\r\n'url\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u5148\u53d6\u5f97\r\n  Dim ret\r\n  \r\n  With CreateObject(&quot;WScript.Shell&quot;)\r\n    With .CreateShortcut(TargetFilePath)\r\n      ret = .TargetPath\r\n    End With\r\n  End With\r\n  GetShortcutTargetPathFromUrl = ret\r\nEnd Function\r\n\r\nPrivate Function GetShortcutTargetPathFromWebsite(ByVal TargetFilePath)\r\n'website\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u5148\u53d6\u5f97\r\n  Dim ret, s\r\n  \r\n  With CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n    With .OpenTextFile(TargetFilePath)\r\n      Do Until .AtEndOfStream\r\n        s = .ReadLine\r\n        If LCase(Left(s, 4)) = &quot;url=&quot; Then\r\n          ret = s\r\n          Exit Do\r\n        End If\r\n      Loop\r\n      .Close\r\n    End With\r\n  End With\r\n  ret = Mid(ret, 5) '\u884c\u982d\u306e4\u6587\u5b57(URL=)\u9664\u5916\r\n  GetShortcutTargetPathFromWebsite = ret\r\nEnd Function<\/pre>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306b\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3068\u30ea\u30f3\u30af\u5148URL\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OutputIEFavoritesVBS_01.jpg\" alt=\"\" width=\"735\" height=\"359\" class=\"alignnone size-full wp-image-8412\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OutputIEFavoritesVBS_01.jpg 735w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OutputIEFavoritesVBS_01-300x147.jpg 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/p>\n<p>\u300c\/\/Nologo\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u3066\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3068\u3001CSV\u30d5\u30a1\u30a4\u30eb\u3082\u3059\u3050\u306b\u4f5c\u308c\u3066\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OutputIEFavoritesVBS_02.jpg\" alt=\"\" width=\"746\" height=\"559\" class=\"alignnone size-full wp-image-8413\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OutputIEFavoritesVBS_02.jpg 746w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OutputIEFavoritesVBS_02-300x225.jpg 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/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":"Internet Explorer\u306e\u304a\u6c17\u306b\u5165\u308a\u306b\u3069\u306e\u4f4d\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u8abf\u3079\u308b\u30b9\u30af\u30ea\u30d7\u30c8(\u5bfe\u5fdc\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\uff1aurl,website)\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002 Option Explicit C [&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":"\u8907\u6570\u306e\u7aef\u672b\u304b\u3089IE\u306e\u304a\u6c17\u306b\u5165\u308a\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u66f8\u3044\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002 [Internet Explorer\u306e\u304a\u6c17\u306b\u5165\u308a\u3092\u5217\u6319\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":[6],"tags":[],"class_list":["post-8411","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","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-2bF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8411","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=8411"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8411\/revisions"}],"predecessor-version":[{"id":8414,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8411\/revisions\/8414"}],"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=8411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}