piglovesrat15 Posted November 3, 2011 Share 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. Link to comment Share on other sites More sharing options...
cluberti Posted November 3, 2011 Share 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 Link to comment Share on other sites More sharing options...
powerdown Posted November 8, 2011 Share 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. Link to comment Share on other sites More sharing options...
IcemanND Posted November 9, 2011 Share 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. Link to comment Share on other sites More sharing options...
piglovesrat15 Posted November 9, 2011 Author Share Posted November 9, 2011 Thanks to all three. IcemanND - No need to, the VBScript is enough. Thanks again. Link to comment Share on other sites More sharing options...
xpclient Posted October 18, 2012 Share Posted October 18, 2012 A year late to revive this post but Taskbar Pinner will be most useful to you guys. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now