Tuesday, 16 December 2014

Add start menu shortcut via Group Policy

In this article I am going to explain about how to add shortcut icon in start menu to open file/folder or start application through Group Policy. This is a very common task in any GPO based Active Directory domain environment for either all of your user’s computer or to a certain group of user’s computer depending on your needs. You can do it easily via Group Policy's User Preferences setting Shortcuts (Default Domain Policy\User Configuration\Preferences\Shortcuts).

Note: If you want to Pin a Program in Start Menu, Refer this article: How to Pin a Program to Start menu via Group Policy

Steps to add start menu shortcut via Group Policy

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

2.  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 ManagementTeam. so Right-click the OU ManagementTeam, and click Create a GPO in this domain, and Link it here...

Add start menu shortcut via Group Policy

3. Give the new policy name and click OK. Here, I am giving the policy name start-menu-shortcut-policy
  
Add start menu shortcut via Group Policy

4. Now Right-click on the newly created gpo start-menu-shortcut-policyand click edit.

Add start menu shortcut icon via Group Policy

5. In the Group Policy Management Editor window, expand User Configuration and go to the node Shortcuts (User Configuration/Preferences/Windows Settings/Shortcuts).

6. Right-click in the white space empty area, click New and then select Shortcut.

Create start menu shortcut via GPO

7. In the General tab, fill the following details:
      Name: My Shortcut File (this is the name that will show up on the shortcut in the user's start menu)
      Target type: File System Object
      Location: Start Menu
      Target path: D:\OfficeFiles\MyFile.txt

Note:Here, I have given the file path of MyFile.txt, you can give your own file or folder path which you want to create start menu shortcut.
Create start menu shortcut via GPO

8. Click on the Common tab.
Select Remove this item when it is no longer applied and select OK to the prompt about changing the Action field to ‘Replace’.What this will do is remove the shortcut from start menu if we delete this policy, or if the user falls out of the OU structure that has this policy applied to it.

Add start menu shortcut via GPO

9. In the Description field, write the description as easy way to understand what is this policy, click Apply, and OK.
Create start menu shortcut for a file via GPO

10. Now update the GPO by running the command gpupdate /force

Create start menu shortcut for a folder via GPO

11. That's all. Now we have successfully created start menu shortcut icon of the file MyFile.txt for the users who are under OU ManagementTeam. You can see that shortcut under star menu by logging into any of the user's desktop who are under ManagementTeam OU

Add start menu shortcut icon via Group Policy

Now, you can create your own GPO, and create add shortcut icon into start menu via Group Policy as per your wish.......

Related Articles:

Add Environment Variable via Group Policy
Add desktop shortcut icon through Group Policy
Pin Program to Taskbar via Group Policy
How to Pin a Program to Start menu via Group Policy

Advertisements
Advertisements

2 comments:

  1. Hi,
    Is there a way to hide specific short cuts (.lnk) like Excel or other office programs via group policy ?
    I was able to block the access via permissions, but the links still show...
    Thanks

    ReplyDelete
    Replies
    1. Task Scheduler+Robocopy+batch script=add/replace any start menu shortcut or run anything for standard user account.

      The reason for the task schedule rather than shortcut in group policy is to give administration privleges to delete/replace/update the shortcuts in "C:\programdata\microsoft\windows\programs" as by default not even domain administrators have write access to this location, having this as a scheduled task allows you to run any program that requires administration privleges on a standard user account as well.

      @echo off
      mkdir c:\temp
      robocopy "c:\programdata\microsoft\windows\start menu\programs\" c:\Delete /e /MOVE /MINAGE:14 /LOG+:c:\robocopy.log
      rmdir c:\temp /s /q

      :: The above moves everything from the start menu\Programs or AllPrograms if win8+ then deletes it.

      robocopy "\\server\share\StartMenuShortcuts" "C:\programdata\microsoft\windows\start menu\programs" /is /e

      :: This will copy all items/shortcuts from the server share folder "StartMenuShortcuts" to the local start menu shortcut location.

      Just place all of your shortcuts you want in the "StartMenuShortcuts" folder and the above script will remove all old shortcuts and replace them with new ones from the StartMenuShortcuts folder. just remove the comments ::

      Delete