Automate creation of taskbar shortcuts

0

1

I have Windows 8 computers on a domain. I want to create a Group Policy Object to create taskbar shortcuts for users as they move onto different machines.

I have created a batch file that will copy the shortcut (i.e. Word.lnk) file to the following folder:

C:\Users\User\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar

However this doesn't create a link on the user's taskbar. I presume there is a registry setting somewhere, but can't find anything in Google about it.

Does anyone know a fix for this please?

The Woo

Posted 2013-06-14T04:34:47.110

Reputation: 377

Answers

1

You can use a VBScript file like the following:

Const CSIDL_COMMON_PROGRAMS = &H17
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Word 2010.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next

If you want to pin any arbitrary EXE to the taskbar, take a look at this article, download the attached code and call PinItem.vbs like this:

cscript PinItem.vbs /taskbar /item:"Drive:\Path\to\app.exe"

Karan

Posted 2013-06-14T04:34:47.110

Reputation: 51 857