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!

link|improve this question

56% accept rate
feedback

2 Answers

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
link|improve this answer
feedback

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 :(

link|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
feedback

Your Answer

 
or
required, but never shown

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