piglovesrat15 Posted November 3, 2011 Posted November 3, 2011 Hello. Just want to ask anyone out there if they know a command to pin or unpin a program from taskbar. I know how to pin or unpin manually using the mouse and the shortcuts are in "%appdata%\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar".What I try to do is run command if a specific shortcut in there, then delete it. I use the DEL command, it only deletes the shortcut in "%appdata%\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar" folder but the icon (even though it's now blank) still pins from the taskbar.Thanks.
cluberti Posted November 3, 2011 Posted November 3, 2011 You can use vbscript to do it, but there's no command or API (by design) to handle this.http://blogs.technet.com/b/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx
powerdown Posted November 8, 2011 Posted November 8, 2011 I use two commands to do this. I got them from somewhere, can't remember where right now. First is a VBscript that preforms the operation you can shange the "Pin to Start Menu" to "Pin to Taskbar" (same for "Unpin...": Set objShell = CreateObject("Shell.Application")set filesystem = CreateObject("scripting.Filesystemobject")Set objFolder = objShell.Namespace(filesystem.GetParentFolderName(Wscript.Arguments(0)))Set objFolderItem = objFolder.ParseName(filesystem.GetFileName(WScript.Arguments(0)))Set colVerbs = objFolderItem.VerbsFor Each objVerb in colVerbs If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt If Replace(objVerb.name, "&", "") = "Unpin from Start Menu" Then objVerb.DoItNextThen I make a cmd file with the items I want to Pin and point them to the VBScript:cd /d %~dp0WScript.exe %~dp0PinToStartMenu.vbs "path to app you want to Pin"You can add multiple Items in the cmd file to Pin/Unpin all the items you want.
IcemanND Posted November 9, 2011 Posted November 9, 2011 I have a powershell script somewhere that will let you pin and unpin items to the taskbar and the start menu. If you are interested let me know and I can look for it and post it.
piglovesrat15 Posted November 9, 2011 Author Posted November 9, 2011 Thanks to all three. IcemanND - No need to, the VBScript is enough. Thanks again.
xpclient Posted October 18, 2012 Posted October 18, 2012 A year late to revive this post but Taskbar Pinner will be most useful to you guys.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now