Where Customization Begins 

  • How to pin shortcut on the task bar via script

  • Here you will find out how to customize from top to bottom your operative system!
Here you will find out how to customize from top to bottom your operative system!
 #19629  by nice_guy75
 01 Oct 2011, 13:17
Ok guys,
I have been searching the method to pin shortcut of some application on the task bar that too with the help of script. Most of the people think that mere putting the shortcut in the task bar folder @

Code: Select all%UserProfile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
is enough to pin the shortcut, but it will not work, I have already tried.

Here is the method to pin an applications shortcut on the task bar, here we will pin Google Chrome's shortcut on the task bar:

First copy this content on notepad and save it as "pintotaskbar.vbs"
Code: Select allSet 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.Verbs
For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt

Now copy this content on notepad and save it as "(Any Name).cmd"

Code: Select allcd /d %~dp0
WScript.exe %~dp0PinToTaskbar.vbs %userprofile%\AppData\Local\Google\Chrome\Application\chrome.exe

Place both the files in the same folder and now make this cmd run after the installation of google chrome, it will pin chrome's shortcut on the taskbar, it is test on already installed OS, and I guess should work during the installation as well.

These scripts are not mine, these are written by maxXPsoft of msfn.org, all credit goes to him.
Last edited by nice_guy75 on 02 Oct 2011, 13:06, edited 1 time in total.
 #19632  by Shaneee
 01 Oct 2011, 13:43
Can also be done through the AUTOUNATTEND.XML file.
 #19633  by nice_guy75
 01 Oct 2011, 13:48
IiTz ShAnE™ wrote:Can also be done through the AUTOUNATTEND.XML file.

I know the method of pinning shortcuts on the start menu by autounttend.xml but not on the taskbar, thought I have seen some example of pinning shortcut of some default applications of windows itself.

Can you please elaborate how can we pin shortcut of chrome through autoattended.xml, ofcourse with example?

Edit: I guess you must be talking about this
Code: Select allhttp://blogs.technet.com/b/askcore/archive/2010/03/16/how-to-customize-the-windows-7-start-menu-and-taskbar-using-unattend-xml.aspx

But I don't think we can pin chrome's shortcut using this method.
 #19642  by Shaneee
 01 Oct 2011, 15:02
Code: Select all         <TaskbarLinks>

Would be similar to that if the path is correct. Bottom half removes IE from the taskbar.

Thanks to Neuropass for it though