How to Pin Recycle Bin to Quick Access using InvokeVerb

The Recycle Bin context menu doesn’t have the “Pin to Quick access” context menu. However, you can still pin it to Quick access using the methods in this article. We will see how to pin Recycle Bin to Quick access manually as well as using a script.

How to Pin Recycle Bin to Quick Access

Option 1

Open the Recycle Bin folder. By default, it opens to the “Manage”/”Recycle Bin Tools” tab. Click on the Home tab, and click Pin to Quick access. Alternatively, you can drag the Recycle Bin desktop icon to the Quick access area in a folder window and drop it.

Option 2: Using Script (“InvokeVerb” method)


'Pin Recycle Bin to Quick Access - VBScript code
Dim oShell: Set oShell = CreateObject("Shell.Application")
Dim WshShell: Set WshShell = CreateObject("Wscript.Shell") 
sRB = "{645FF040-5081-101B-9F08-00AA002F954E}"
sKey = "HKCU\Software\Classes\CLSID\" & _
sRB & "\shell\pintohome\command\"
WshShell.RegWrite sKey & "DelegateExecute", _
"{b455f46e-e4af-4035-b0a4-cf18d2f6f28e}", "REG_SZ"
oShell.Namespace("shell:::" & sRB).Self.InvokeVerb("pintohome")
On Error Resume Next
WshShell.RegDelete sKey
WshShell.RegDelete "HKCU\Software\Classes\CLSID\" & sRB & "\shell\pintohome\"
WshShell.RegDelete "HKCU\Software\Classes\CLSID\" & sRB & "\shell\"
WshShell.RegDelete "HKCU\Software\Classes\CLSID\" & sRB & "\"
On Error GoTo 0
Set oShell = Nothing
Set WshShell = Nothing


$RBPath = "HKCU:\Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\pintohome\command\"
$name = "DelegateExecute"
$value = "{b455f46e-e4af-4035-b0a4-cf18d2f6f28e}"
New-Item -Path $RBPath -Force | out-null
New-ItemProperty -Path $RBPath -Name $name -Value $value -PropertyType String -Force | out-null
$oShell = New-Object -ComObject Shell.Application
$trash = $oShell.Namespace("shell:::{645FF040-5081-101B-9F08-00AA002F954E}")
Remove-Item -Path "HKCU:\Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}" -Recurse

Hint: The trick is to temporarily create a PintoHome verb under the Recycle Bin GUID. This is because the PintoHome verb under HKCR\Folder doesn’t work for the Recycle Bin special folder due to a folder GUID validation being in place. After invoking the verb and pinning the item, the PintoHome verb under the Recycle Bin GUID can be removed.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

Leave a Reply