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

前端 未结 9 895
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 12:18

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 ad

9条回答
  •  感情败类
    2020-11-28 12:26

    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

提交回复
热议问题