“Add to Favorites” is a built-in Windows 11 command that pins a file to the Favorites section of File Explorer Home. You can hide it by adding an empty string value named ProgrammaticAccessOnly to the pintohomefile key in the registry, and delete that value to bring it back. If you would rather not edit the registry, ContextCleaner from Automata Labs lists every right-click entry with where it comes from, and hides the ones you choose with an automatic backup and one-click undo.
Hide the right-click entries you never use, and undo any change with one click.
Get it from Microsoft
Why is “Add to Favorites” in my right-click menu?
It came with the File Explorer Home redesign. The Windows 11 Forum tutorial Add or Remove “Add to Favorites” Context Menu in Windows 11 explains that starting with build 22593, Quick access became Home, and “Pinned files is now called Favorites to align with Office and OneDrive.” The tutorial adds: “You can use the Add to Favorites context menu to pin files you want to File Explorer Home.”
So the entry is not an app add-on. It is a Windows command that appears when you right-click files, and it exists to feed the Favorites list in Home. If you never pin files there, it is one more line between you and the commands you do use.
How do I remove “Add to Favorites” with the registry?
The entry is a shell verb registered under the pintohomefile key. Microsoft’s documentation on creating shortcut menu handlers describes “Programmatic Access Only Verbs” that “are never displayed in a context menu.” To define one, “add a ‘ProgrammaticAccessOnly’ REG_SZ value to the verb’s subkey. The value should not have any data associated with it.” Windows can still run the command internally. It simply stops showing it in the menu.
Back up the registry, or at least export the key, before you change it.
For your account only:
- Press Win+R, type
regeditand press Enter. - Go to
HKEY_CURRENT_USER\Software\Classes\*\shell\pintohomefile. If thepintohomefilekey does not exist under your account, create it. - Right-click in the right pane, choose New, String Value, and name it
ProgrammaticAccessOnly. - Leave its data empty.
- Right-click a file to check. If the entry is still there, restart Explorer or sign out and back in.
The Windows 11 Forum tutorial gives the same change as a .reg file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\*\shell\pintohomefile]
"ProgrammaticAccessOnly"=""
For all users on the PC (requires administrator rights), the tutorial uses the machine-wide key instead:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\pintohomefile]
"ProgrammaticAccessOnly"=""
How do I get “Add to Favorites” back?
Delete the ProgrammaticAccessOnly value you added. In a .reg file, the tutorial writes the deletion as:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\*\shell\pintohomefile]
"ProgrammaticAccessOnly"=-
If you hid it for all users, also remove the value from HKEY_CLASSES_ROOT\*\shell\pintohomefile. The tutorial’s all-users restore file removes it from both places.
Why did my registry change not work?
The usual cause is editing the wrong layer of the registry. HKEY_CLASSES_ROOT is not a real key on its own. Microsoft’s article on the merged view of HKEY_CLASSES_ROOT explains that it “merges the information from HKEY_LOCAL_MACHINE\Software\Classes with the information from HKEY_CURRENT_USER\Software\Classes,” and that the per-user settings take priority.
In practice that means:
| Symptom | Likely cause | What to check |
|---|---|---|
| Entry still shows after the change | Explorer has not reloaded the menu | Restart Explorer, or sign out and back in |
| Hidden for you but not for other users | You changed the per-user key | Use the all-users key with admin rights |
| Restore did not bring it back | The value still exists in the other layer | Check both the HKCU and HKCR paths |
| The key path does not exist | Different Windows build | Confirm the entry exists on your build first |
| Entry returned after an update | Windows re-registered the command | Re-apply, or use a tool that shows changes |
The Windows 11 Forum thread has a useful discussion of exactly this, including the point that once a per-user key exists, writes through HKEY_CLASSES_ROOT can land in the per-user copy rather than the machine-wide one. If you are scripting this across PCs, write to the explicit HKCU or HKLM path rather than to HKEY_CLASSES_ROOT.
Does hiding the menu entry remove Favorites from File Explorer?
No. Hiding the command only removes the right-click shortcut for pinning files. The Favorites section in Home stays, and so do any files already pinned there. You can still unpin those files from Home itself. If your goal is a simpler Home page rather than a shorter menu, that is a separate File Explorer setting, not a context menu change.
How does ContextCleaner handle built-in entries like this?
Built-in commands like this one are exactly where hand-editing gets confusing, because the same entry can live in two registry layers and Windows updates can change things. ContextCleaner shows the menu as one list instead. According to its Microsoft Store listing, it:
- Finds every right-click entry across all four Windows menu surfaces and shows them in one place.
- Shows where each entry comes from: which app, DLL or package added it, and which file types it affects.
- Cleans both menus: the Windows 11 modern menu and the classic “Show more options” list.
- Saves a backup before every change, with one-click restore from any earlier snapshot.
- Keeps undo and redo history that survives closing and reopening the app.
- Warns you before you switch off a built-in Windows component, so you do not hide something important by accident.
See every right-click entry in one list, hide what you do not need, and roll back any time.
Get it from Microsoft
Windows builds differ, and Microsoft can rename or move built-in commands. Check that “Add to Favorites” appears in ContextCleaner’s list on your PC before relying on it for this entry. For other entries you may want gone, see how to remove “Edit in Notepad” and how to remove “Ask Copilot”.
Frequently asked questions
What does “Add to Favorites” do in Windows 11?
It pins the selected file to the Favorites section of File Explorer Home, the list that used to be called Pinned files.
Is it safe to hide “Add to Favorites”?
Yes, in the sense that it is a single, reversible value. Windows keeps the command available internally, and deleting the value restores the menu entry. As with any registry change, export the key first.
Will hiding it unpin my favorite files?
No. Files already in Favorites stay there. You lose only the right-click shortcut for adding new ones.
Why do I see “Add to Favorites” but not “Pin to Quick access” on files?
Pin to Quick access is for folders. Files go to Favorites in Home, which is what this command does.
Can I remove it without the registry?
Yes. ContextCleaner lists right-click entries and hides them with toggles, with a backup and undo for every change. Our overview of cleaning up the Windows 11 right-click menu without the registry explains the approach.
Try ContextCleaner
Get ContextCleaner from the Microsoft Store. The Store listing shows the current price.
If an entry you want gone does not appear where you expect in the registry, read why a context menu item is not in the registry.
Clean up your right-click menu in minutes, with every change reversible.
Get it from Microsoft
Microsoft, Windows, File Explorer, OneDrive and Office are trademarks of the Microsoft group of companies. ContextCleaner is not affiliated with or endorsed by Microsoft.
Last updated 23 October 2026. Published by Automata Labs, a software company in Canada.