📜 VBScript (WSH)

Show Recycle Bin Icon on Desktop (VBScript)

Adds the Recycle Bin icon back to the desktop. Applies the tweak via WScript.Shell.RegWrite.

By WindowsScripting.com · 761 B
SetShowRecycleBinOnDesktop.vbs
' ============================================================
' SetShowRecycleBinOnDesktop.vbs
'
' Show Recycle Bin Icon on Desktop.
' Adds the Recycle Bin icon back to the desktop.
'
' Usage: cscript SetShowRecycleBinOnDesktop.vbs
' ============================================================

Option Explicit

Dim objShell
Set objShell = CreateObject("WScript.Shell")

On Error Resume Next
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{645FF040-5081-101B-9F08-00AA002F954E}", 0, "REG_DWORD"

If Err.Number = 0 Then
    WScript.Echo "Show Recycle Bin Icon on Desktop applied."
Else
    WScript.Echo "Failed to apply tweak (Error " & Err.Number & ": " & Err.Description & ")"
End If
On Error Goto 0