0

With Windows 10/11 you can access the start menu items in these locations:

"%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs"
%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs

For instance:

D:\Users\Hydra>dir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\FireFox*"
 Volume in drive C is WIN11X64PRO
 Volume Serial Number is 1651-A283

 Directory of C:\ProgramData\Microsoft\Windows\Start Menu\Programs

26/06/2024  20:04             2,038 Firefox Private Browsing.lnk
26/06/2024  20:04             1,005 Firefox.lnk
               2 File(s)          3,043 bytes
               0 Dir(s)  228,548,452,352 bytes free

or

PS D:\Users\Hydra> Get-StartApps

Name                                             AppID
----                                             -----
...
Firefox                                          308046B0AF4A39CB
Firefox Private Browsing                         308046B0AF4A39CB;PrivateBrowsingAUMID
...

If you go to the location of the shortcut, copy it, paste it, rename it, and add a command line argument, it does not show up in the start menu.

D:\Users\Hydra>dir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\FireFox*"
 Volume in drive C is WIN11X64PRO
 Volume Serial Number is 1651-A283

 Directory of C:\ProgramData\Microsoft\Windows\Start Menu\Programs

27/06/2024  17:56             1,196 Firefox - Copy.lnk                <--- the copied shortcut.
26/06/2024  20:04             2,038 Firefox Private Browsing.lnk
26/06/2024  20:04             1,005 Firefox.lnk
               3 File(s)          4,239 bytes
               0 Dir(s)  228,381,949,952 bytes free

However, if you go to either of the two locations, and then use "New" -> "Shortcut" and manually pick the executable, and add the appropriate command line arguments to it, it does show up in the start menu.

Additionally, If you pin the original shortcut to the start menu, you have the option to "Unpin from start" on the copied one (!), which has never been pinned, and unpinning the copied one unpins the originally pinned one (!!).

  • Rebuilding the search index does not fix it.
  • Killing 'Start' from task manager does not fix it.
  • Killing 'Explorer' from task manager does not fix it.
  • Logging out and back in again does not fix it.
  • The permissions of the copied shortcut are the same as the original.

I have tried a fresh install of Windows 11 and the behavior is the same. I had similar issues on Windows 10 too.

Why doesn't copying/pasting shortcuts work when creating new ones using explorer does?

1
  • If you add command line arguments to the shortcuts AFTER you place them in the Start Menu folders, does this work? I have added arguments and changed settings of shortcuts in the Start Menu and Taskbar before. I always have to modify these shortcuts after they are in the correct folder AND they are already showing in the Start Menu, though. Commented Jun 27 at 21:02

1 Answer 1

1

The first thing to understand (which you already noticed) is that the Start Menu will try to avoid showing two entries to the same program.

And it seems that behind the scenes, many automatically created Start Menu entries' links reference an App ID instead of a path, even if the shortcut includes a path to the exe in the target box when you view the properties.

I used LEcmd from Eric Zimmerman's tools to analyze a couple of versions of lnk files (I'll paste some info from the output below). It seems that when you create a shortcut via right-click, the shortcut references the path instead of the App ID like the automatically created lnks.

For example, an existing shortcut to a program called Descript yielded some of this info:

Property store data block (Format: GUID\ID Description ==> Value)
   46588ae2-4cbc-4338-bbfc-139326986dce\4      SID                                 ==> S-1-5-21-21056179-259765588-2438881596-1001
   9f4c2855-9f79-4b39-a8d0-e1d42de1d5f3\5      App User Model ID                   ==> com.descript.beachcube
   446d16b1-8dad-4870-a748-402ea43d788c\104    Volume Id                           ==> Unmapped GUID: 7e45836f-5877-403d-bb9a-b3757f06b03b

However, when I copied it and added an argument:

Property store data block (Format: GUID\ID Description ==> Value)
   dabd30ed-0043-4789-a7f8-d013a4736622\100    Item Folder Path Display Narrow     ==> Descript (C:\Users\Joe\AppData\Local\Programs)
   46588ae2-4cbc-4338-bbfc-139326986dce\4      SID                                 ==> S-1-5-21-21056179-259765588-2438881596-1001
   b725f130-47ef-101a-a5f1-02608c9eebac\10     Item Name Display                   ==> Descript.exe
   b725f130-47ef-101a-a5f1-02608c9eebac\15     Date Created                        ==> 06/26/2024 03:28:24
   b725f130-47ef-101a-a5f1-02608c9eebac\12     Size                                ==> 152337440
   b725f130-47ef-101a-a5f1-02608c9eebac\4      Item Type Text                      ==> Application
   b725f130-47ef-101a-a5f1-02608c9eebac\14     Date Modified                       ==> 06/19/2024 22:36:34
   28636aa6-953d-11d2-b5d6-00c04fd918d0\30     Parsing Path                        ==> C:\Users\Joe\AppData\Local\Programs\Descript\Descript.exe
   446d16b1-8dad-4870-a748-402ea43d788c\104    Volume Id                           ==> Unmapped GUID: 7e45836f-5877-403d-bb9a-b3757f06b03b

But here's the significant bit I discovered:

  • The start menu WILL show multiple path-type shortcuts that go to the same executable as long as the arguments are different.

  • For the App ID-type shortcuts (which you can't seem to tell from just looking at it), it will NOT show multiple of them even if the arguments are different.

  • If a path-type shortcut with no arguments resolves to the same executable as an app-id type shortcut, it will NOT show both.

    • It will only show both if the path-type one has arguments. If there are more than one path-type shortcuts, it will show all of them as long as each has unique arguments.
1
  • 1
    Thanks for the investigation. My understanding of the situation is much clearer now. Great answer, you're a credit to this website. Commented Jul 1 at 22:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .