0

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?

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.