2

I'm looking for an extension to this script (or maybe another one... not 100% sure where I got the script I'm using):

'* File:           PinItem.vbs
'* Date:           03/04/2009
'* Version:        1.0.2
'* Main Function:  VBScipt to pin an item to the Start Menu or Taskbar
'* Usage:  cscript PinItem.vbs /item:<path to exe> [/taskbar] [/?]

As an example, I can pin Notepad to my taskbar with this command:

cscript "PinItem.vbs" /taskbar /item:"%windir%\system32\notepad.exe"

This script pins an item to the taskbar.

When a program is on the taskbar, you can use the Recent Items to pin stuff to a jump list - or you can drag/drop files unto the taskbar to have them pin to a jump list. Here I have recent items and a pinned item on a jump list:

enter image description here

(How) Can I add (and/or pin) an item to a jump list on an item on the taskbar? Say I want to add a pinned link to C:\logs\mylog.txt so that it's on the jumplist? Something programmatically done like:

cscript "AddToJumplist.vbs" "%windir%\system32\notepad.exe" "C:\logs\mylog.txt"

(I'm not looking for vbs, powershell, batch, etc in particular... I'm wonder if its even possible to script something like mylog.txt to the notepad.exe taskbar item jumplist)

WernerCD
  • 2,137
  • 6
  • 31
  • 51
  • You could try adding a shortcut to `c:\logs\mylog.txt` to `%appdata%\Microsoft\Windows\Recent`. See [this answer](http://stackoverflow.com/a/30029955/1683264) for a programmatic way to create a shortcut. – rojo May 13 '15 at 19:36
  • @rojo I'll have to try that. I wasn't aware that the jumplist was tied to "recent items", but in a way it makes sense. That could solve one part of my question (how to get them on the jumplist). The next part would be how to script the pinning of an item to the individual jumplist. – WernerCD May 13 '15 at 19:42
  • Not easily that I've found. I think items are added to `...\Recent\AutomaticDestinations` and `...\CustomDestinations`. [This page](http://www.forensicswiki.org/wiki/Jump_Lists) describes the structure of the files contained therein. I'm unfamiliar with any Windows tools that would let you script creation of manual entries. – rojo May 13 '15 at 20:07

0 Answers0