Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a Windows 2008 (R2) Terminal Server environment and would like to find a way to automate the addition (Pinning) of programs to the Windows taskbar for our users.

My first thought was to do this from a Group Policy, but haven't been able to find a setting for this. I've heard you can 'probably' do it via a script, but haven't seen any examples yet (I'm not a programmer, but have worked with batch scripts before). Are there any other methods?

Please advice.


share|improve this question

Since nobody has posted a method that doesn't require a script, here is a script that will invoke the Pin to Taskbar method on a shortcut. I also would like to if anyone knows of any methods that don't require a script.

Option Explicit

ShellActionInvoke "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Other", _
                  "Lock Screen.lnk", _
                  "Pin to Tas&kbar"

Function ShellActionInvoke(Fol, File, Verb)
    On Error Resume Next
    Dim objWscriptShell
    Set objWscriptShell = WScript.CreateObject("WScript.Shell")
    Dim objAppShell
    Set objAppShell = CreateObject("Shell.Application")
    Dim objFolder
    Set objFolder = objAppShell.Namespace(Fol)
    Dim objFolderItem
    Set objFolderItem = objFolder.ParseName(File)
    Dim objVerb, colVerbs
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If objVerb.Name = Verb Then objVerb.DoIt()
End Function
share|improve this answer

That doesn't really work out. This will only work on English Windows version. I am looking for a solution without translating this Verb to every possible language :(

share|improve this answer
You probably wanted to add this as a comment and NOT an answer. – l0c0b0x May 17 '10 at 19:11
would have done so if the "add comment" link is visible on the last post o.O I only see link | flag there. – GeekByChoiCe May 18 '10 at 5:43

Your Answer


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.