📊 VBA (Excel)
Apply Show This PC Icon on Desktop (VBA)
Adds the This PC icon back to the desktop. Applied via WScript.Shell.RegWrite from VBA.
ShowThisPCOnDesktopRegSet.bas
Attribute VB_Name = "ShowThisPCOnDesktopRegSet"
Option Explicit
Public Sub ShowThisPCOnDesktopRegSet()
Dim wsh As Object
Dim regPath As String
Set wsh = CreateObject("WScript.Shell")
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
wsh.RegWrite regPath, 0, "REG_DWORD"
MsgBox "Show This PC Icon on Desktop applied." & vbCrLf & regPath, vbInformation
End Sub