{"id":3447,"date":"2018-07-06T02:48:14","date_gmt":"2018-07-06T02:48:14","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=3447"},"modified":"2022-12-02T02:35:52","modified_gmt":"2022-12-02T02:35:52","slug":"pin-items-to-windows-10-task-bar","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/code\/pin-items-to-windows-10-task-bar","title":{"rendered":"Pin Items to Windows 10 Task bar"},"content":{"rendered":"<div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&#039;---pin and unpin: taskbarpin.vbs [fullpath]------<br\/>&#039;---Example: taskbarpin.vbs &quot;C:\\Windows\\notepad.exe&quot;<br\/>If WScript.Arguments.Count &lt; 1 Then WScript.Quit<br\/>&#039;----------------------------------------------------------------------<br\/>Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br\/>objFile    = WScript.Arguments.Item(0)<br\/>sKey1      = &quot;HKCU\\Software\\Classes\\*\\shell\\{:}\\\\&quot;<br\/>sKey2      = Replace(sKey1, &quot;\\\\&quot;, &quot;\\ExplorerCommandHandler&quot;)<br\/>&#039;----------------------------------------------------------------------<br\/>With WScript.CreateObject(&quot;WScript.Shell&quot;)<br\/>    KeyValue = .RegRead(&quot;HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer&quot; &amp; _<br\/>        &quot;\\CommandStore\\shell\\Windows.taskbarpin\\ExplorerCommandHandler&quot;)<br\/><br\/>    .RegWrite sKey2, KeyValue, &quot;REG_SZ&quot;<br\/><br\/>    With WScript.CreateObject(&quot;Shell.Application&quot;)<br\/>        With .Namespace(objFSO.GetParentFolderName(objFile))<br\/>            With .ParseName(objFSO.GetFileName(objFile))<br\/>                .InvokeVerb(&quot;{:}&quot;)<br\/>            End With<br\/>        End With<br\/>    End With<br\/><br\/>    .Run(&quot;Reg.exe delete &quot;&quot;&quot; &amp; Replace(sKey1, &quot;\\\\&quot;, &quot;&quot;) &amp; &quot;&quot;&quot; \/F&quot;), 0, True<br\/>End With<br\/>&#039;----------------------------------------------------------------------<\/code><\/pre> <div class=\"code-embed-infos\"> <a href=\"https:\/\/github.com\/pariswells\/pariswells.com\/blob\/master\/windows10taskbarpin.vbs\" title=\"See windows10taskbarpin.vbs\" target=\"_blank\" class=\"code-embed-name\">windows10taskbarpin.vbs<\/a> <a href=\"https:\/\/raw.github.com\/pariswells\/pariswells.com\/master\/windows10taskbarpin.vbs\" title=\"Back to windows10taskbarpin.vbs\" class=\"code-embed-raw\" target=\"_blank\">view raw<\/a> <\/div> <\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[2284,2555,1213],"class_list":["post-3447","post","type-post","status-publish","format-standard","hentry","category-code","tag-gpo","tag-pin","tag-windows-10"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/3447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=3447"}],"version-history":[{"count":2,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/3447\/revisions"}],"predecessor-version":[{"id":6452,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/3447\/revisions\/6452"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=3447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=3447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=3447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}