Is it possible programmatically add folders to the Windows 10 Quick Access panel in the explorer window?

There is a simple way to do it in powershell (at least) :

$o = new-object -com shell.application
$o.Namespace('c:\My Folder').Self.InvokeVerb("pintohome")

Hope it helps.


Maybe it will help someone until MS releases an API. I ran procmon and it seems that these registry keys are involved

Pin to Quick access:

HKEY_CLASSES_ROOT\Folder\shell\pintohome

When unpin:

HKEY_CLASSES_ROOT\PinnedFrequentPlace\shell\unpinfromhome\command

Also this resource is used when pinning: (EDIT1: can't find it any longer..)

AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\{SOME_SORT_OF_GUID}.automaticDestinations-ms

You can try opening it with 7-zip, there are several files in there which fit the destination

EDIT2: I found running this in the 'Run' opens up Quick access:

shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}

Yohan Ney's answer for pinning an item is correct. To unpin an item you can do this:

$QuickAccess = New-Object -ComObject shell.application 
($QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | where {$_.Path -eq "C:\Temp"}).InvokeVerb("unpinfromhome")

Here's a script I wrote to make pin/unpin a little easier:

https://gallery.technet.microsoft.com/Set-QuickAccess-117e9a89