Windows – n AUTOMATED way to pin items to the taskbar in a windows 2008 TS environment

automationterminal-serverwindowswindows-server-2008

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.

Thanks!

Best Answer

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")
    Fol=objWscriptShell.ExpandEnvironmentStrings(Fol)
    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()
    Next
End Function