Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Apparently Microsoft has (sort of) replaced the "Favorites" Windows explorer item with the Quick Access item. But I haven't been able to find a way to programmatically add folders to it (neither on Google not MSDN). Is there no way to do this yet?

like image 507
conectionist Avatar asked May 05 '15 11:05

conectionist


People also ask

Can you add folders to quick access?

In Windows 10, right-click on a folder you wish to add to Quick Access. From the pop-up menu, click Pin to Quick access, and that folder now appears in the list of those most frequently used. In Windows 11, right-click on a folder and select Show more options > Pin to Quick access.

How do I customize the File Explorer Quick Access toolbar in Windows 10?

One way is to open the "Customize Quick Access Toolbar" menu and click or tap "Show above the Ribbon." Alternatively, right-click or press-and-hold any button from the toolbar or the ribbon to "Show the Quick Access Toolbar above the Ribbon."

Can you add a file to quick access?

Add a file to Quick AccessAdding a file to Quick Access is (almost) as easy as dragging and dropping a file to the Favorites section. First, navigate to the file you want to add to Quick Access. Right-click the file, and then click Pin to Quick Access.


2 Answers

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.

like image 182
Yohan Ney Avatar answered Sep 24 '22 02:09

Yohan Ney


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

like image 33
Johan Carlsson Avatar answered Sep 26 '22 02:09

Johan Carlsson