Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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