0x5bfa.dev

How pinning/unpinning a folder works

0x5bfa2026-02-06Updated on 2026-02-08

You love pinning, right?

You love pinning, I love pinning, I have pinned hundreds of folders. I have been wondering how pinning a folder works, is there a storage for it?

When you right click on an item to click on "Pin to Quick Access", a shell verb called "pintohome" is invoked through IContextMenu. This is registered in Registry like this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\pintohomefile]
"CommandStateHandler"="{b455f46e-e4af-4035-b0a4-cf18d2f6f28e}"
"CommandStateSync"=""
"MUIVerb"="@shell32.dll,-51608"
"NeverDefault"=""
"SkipCloudDownload"=dword:00000000

[HKEY_CLASSES_ROOT\*\shell\pintohomefile\command]
"DelegateExecute"="{b455f46e-e4af-4035-b0a4-cf18d2f6f28e}"

In this case, the command implements IExecuteCommand and so it's registed on DelegateExecute.

What interfaces does it implement?

We now know its CLSID, let's find IIDs that the command implements via OleView.NET.

img

As you can see, it looks like the COM class implements these interfaces and a normal IExecuteCommand-based command and you don't need extra care for something.

class CPinToFrequentPlacesExecute
    : public IObjectWithSelection           // 1C9CD5BB-98E9-4491-A60F-31AACC72B83C
    , public IExecuteCommand                // 7F9185B0-CB92-43C5-80A9-92277A4F7B54
    , public IExplorerCommandState          // BDDACB60-7657-47AE-8445-D23E1ACF82AE
    , public IObjectWithAssociationElement  // E157C3A1-A532-4DE2-9480-1452B7426EEE
    , public IObjectWithSite                // 
    , public IUnknown                       // 
{

}