none
Pinning and folder and shortcuts to start bar with GP RRS feed

  • Question

  • Hello,

     

    I am trying to pin a folder and shortcuts to the start menu using group policy. 

     

    I have been able to create the folder and the shortcut in the correct location but they still don't appear. After reading around I have found that there are registry changes as well. After looking at the registry I see its not as simple as just adding new entries.

    Someone suggested using a reference machine to configure the start menu and then copy the registry. Unfortunately the shortcut I have created are shortcuts to network drives and I cant pin them to the start menu. Does anyone have any ideas?

    Friday, November 4, 2011 2:51 PM

Answers

  • Use a vbscript.. here's what I use to pin Office

    OnErrorResumeNext

    Const CSIDL_COMMON_PROGRAMS = &H17
    Const CSIDL_PROGRAMS = &H2

    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set objShell = CreateObject("Shell.Application") 
    Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS) 
    Set objUsersProgramsFolder = objShell.NameSpace(CSIDL_PROGRAMS)

    strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
    strUsersProgramsPath = objUsersProgramsFolder.Self.Path

    ' Check to see if the script has executed for this user before
    iCheck = WshShell.RegRead("HKCU\Software\TransUnion\Windows 7\PintoDefaults")

    ' if the script has executed before, quit the script
    if iCheck = 1then WScript.Quit

    ' Write to the registry that this script has run
    WshShell.RegWrite"HKCU\Software\TransUnion\Windows 7\PintoDefaults", 1 ,"REG_DWORD"

    ' For Office 2010 Applications
    Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office") 

    Set objFolderItem = objFolder.ParseName("Microsoft Outlook 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next

    Set objFolderItem = objFolder.ParseName("Microsoft Outlook 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next

    Set objFolderItem = objFolder.ParseName("Microsoft Excel 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next

    Set objFolderItem = objFolder.ParseName("Microsoft Word 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next


    Jay Parekh | http://www.desktopguy.com

    Project Leadership Associates

    http://www.projectleadership.net
    • Proposed as answer by Jay Parekh (PLA) Wednesday, November 9, 2011 3:39 PM
    • Marked as answer by Bruce-Liu Tuesday, November 29, 2011 10:08 AM
    Friday, November 4, 2011 5:57 PM
  • Hi,

     

    Here is another script which might be helpful for you:

     

    Pin and unpin applications from the taskbar and Start-menu

    http://gallery.technet.microsoft.com/scriptcenter/b66434f1-4b3f-4a94-8dc3-e406eb30b750

     

    Regards,

    Bruce

    • Marked as answer by Bruce-Liu Tuesday, November 29, 2011 10:08 AM
    Wednesday, November 9, 2011 5:37 AM

All replies

  • Use a vbscript.. here's what I use to pin Office

    OnErrorResumeNext

    Const CSIDL_COMMON_PROGRAMS = &H17
    Const CSIDL_PROGRAMS = &H2

    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set objShell = CreateObject("Shell.Application") 
    Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS) 
    Set objUsersProgramsFolder = objShell.NameSpace(CSIDL_PROGRAMS)

    strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
    strUsersProgramsPath = objUsersProgramsFolder.Self.Path

    ' Check to see if the script has executed for this user before
    iCheck = WshShell.RegRead("HKCU\Software\TransUnion\Windows 7\PintoDefaults")

    ' if the script has executed before, quit the script
    if iCheck = 1then WScript.Quit

    ' Write to the registry that this script has run
    WshShell.RegWrite"HKCU\Software\TransUnion\Windows 7\PintoDefaults", 1 ,"REG_DWORD"

    ' For Office 2010 Applications
    Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office") 

    Set objFolderItem = objFolder.ParseName("Microsoft Outlook 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next

    Set objFolderItem = objFolder.ParseName("Microsoft Outlook 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next

    Set objFolderItem = objFolder.ParseName("Microsoft Excel 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next

    Set objFolderItem = objFolder.ParseName("Microsoft Word 2010.lnk") 
    Set colVerbs = objFolderItem.Verbs
    ForEach objVerbin colVerbs
        RemIf Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt 
        IfReplace(objVerb.name, "&", "") = "Pin to Taskbar"Then objVerb.DoIt
    Next


    Jay Parekh | http://www.desktopguy.com

    Project Leadership Associates

    http://www.projectleadership.net
    • Proposed as answer by Jay Parekh (PLA) Wednesday, November 9, 2011 3:39 PM
    • Marked as answer by Bruce-Liu Tuesday, November 29, 2011 10:08 AM
    Friday, November 4, 2011 5:57 PM
  • Hi,

     

    Here is another script which might be helpful for you:

     

    Pin and unpin applications from the taskbar and Start-menu

    http://gallery.technet.microsoft.com/scriptcenter/b66434f1-4b3f-4a94-8dc3-e406eb30b750

     

    Regards,

    Bruce

    • Marked as answer by Bruce-Liu Tuesday, November 29, 2011 10:08 AM
    Wednesday, November 9, 2011 5:37 AM