Monday, 12 May 2014

How to Pin a Program to Start menu via Group Policy

Description:

In this article, I am going write step-by-step guide for how to Pin a Program to Start menu via GPO. There is no direct Group Policy Preference setting to Pin Items to Start menu via GPO for all users. We are going to achieve via Logon Script. before start to read, pleas click to download vbscript: Download PinItems . Here, I have explained two processes, Pin a Program to Start menu in Local Machine and Pin a Program/Item to Start menu through GPO for all users.

Summary:


How to Pin Programs to Start menu in Windows 7

   In Windows 7, Start Menu pinned items are stored in the following location:

%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu

Steps to Pin Programs/Items to Start menu in Current Machine:

1.  Click to download the vbscript file PinItems Download PinItems.
2.  Place the downloaded vbscript file in your favourite place. I have placed here -> C:\Scripts\PinItem.vbs
3.  Now run the following command in Command Prompt to Pin MS Paint Program to Start menu.
cscript C:\Scripts\PinItem.vbs  /item:"c:\windows\system32\mspaint.exe"

How to Pin a Program to Start menu via Group Policy

4. Then go the Start menu pinned items location : %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu and you could see the shortcut icon for paint program.
How to Pin a Program to Start menu via Group Policy


Note: Here, you can replace your own program's exe path that you are going to pin it in Start menu.
Ex: Use the below command to pin uTorrent in Start menu.
cscript C:\Scripts\PinItem.vbs /item:"C:\Program Files\uTorrent\uTorrent.exe"

How to Pin a Program to Start menu via GPO

   After read the above steps, you may guess what we are going to do to Pin a Program/Items to Start menu via Group Policy. We are going save the above commands in a script or batch file and run through GPO's logon script to Pin a Programs to Start menu for all user's computer.

Steps to Pin a Program/Items to Start menu through GPO:

1. Click to download the vbscript file PinItems Download PinItems.

2. Place the downloaded vbscript file in any share path(Network Share). I have placed here -> \\work2008R2\share\PinItem.vbs

3. Open new Notepad file, copy the below command and paste in Notepad.
cscript C:\Scripts\PinItem.vbs /item:"c:\windows\system32\mspaint.exe"
4. Save the Notepad file with the extension .bat like PinProgram.bat

5. Place the PinProgram.bat file into same share path where you placed PinItem.vbs (\\work2008R2\share\PinProgram.bat)

How to Pin a Program/Items to Start menu via GPO

6. Open the Group Policy Management console by running the command gpmc.msc.

7. Expand the tree and Right-click on the OU you want this policy to be applied to. Now, I am going to apply users who are under the OU DesignTeam. so right-click on the OU DesignTeam, and click Create a GPO in this domain, and Link it here...

How to Pin a Program to Start menu via GPO

8. Type new policy name and click OK. Here, I am giving policy name Pin-StartMenu-Program-Policy

Steps to Pin a Program to Start menu via GPO

9. Now right-click on the newly created GPO Pin-StartMenu-Program-Policy and click edit.

Steps to Pin a Program to Start menu through GPO

10. Go to the settings Scripts under User Configuration (User Configuration->Policies->Windows Settings->Scripts(Logon/Logoff)). In the right side pane, click Logon.

Steps to Pin a Program/Items to Start menu through GPO

11. Add the batch file path \\work2008R2\share\PinProgram.bat in logon Script Name and click OK.

Steps to Pin a Program/Items to Start menu through GPO

12. Click Apply to apply Logon Script settings.

Steps to Pin a Program/Software/Application to Start menu through GPO

13.Run the command gpupdate /force to apply gpo to all the users under the OU DesignTeam.

How to Pin a Application/Program to Start menu via GPO

Now, you have configured new GPO to Pin a Program/Item to Start menu via GPO in all user's computer. when a user login, this script automatically run and Pin programs to Start menu.

See the below image which I got when login as the user Morgan:

Pin a Application/Program to Start menu via GPO

Related Articles:

Create Folder on Desktop via GPO
Add Environment Variable via Group Policy
Add desktop shortcut icon through Group Policy
Pin Program to Taskbar via Group Policy
Add start menu shortcut via Group Policy

Advertisements
Advertisements

5 comments:

  1. I’ve tried it with different OS (Win7 x32, Win7 x64), but it didn’t work for me.

    cscript C:\tmp\PinItem.vbs /item:”c:\windows\system32\mspaint.exe”

    Script tells me “Item pinned: True” but I can’t find the Item in the start menu

    Did I anything wrong?

    Thanks in advance,
    Rainer

    ReplyDelete
  2. Same for me it's not working!

    ReplyDelete
  3. This doesn't work for me either when called from GPO, but works okay when run manually with the user logged in. I think this script uses verbs, which have to run in the explorer shell. A timing problem maybe? I have tried every possible permeation I can think of in terms of script location, folder permissions etc.
    I wonder if the batch file is being called too early and the logon process hasn't progressed far enough - I also seem to remember something about logon scripts called from GPO running with machine permissions.
    Dunno - all I know is that it doesn't work for me from group policy.

    ReplyDelete
  4. I know this is quite old but I have just implemented this with GPO on Server 2012 R2 and it works fine. However, the instructions for creating the PinProgram.bat has an error. The path to the PinItems.vbs needs to be the path to NETLOGON location of the script e.g. \\\SysVol\\scripts\PinItem.vbs.

    ReplyDelete
  5. Same issue here: manually, the script tells me “Item pinned: True” but I can’t find the Item in the taskbar....Same result in GPO....(Windows 7 SP1 N edition)

    ReplyDelete