Remove Show desktop button next to clock on Windows 10

Using Windows 10 v1803. Is there any way to remove the thin Show desktop slice next to the clock? It is only 5 pixels wide (including the thin grey border), but it is annoying!

Windows 10 Show Desktop slice

The image on the left is the slice itself and the image on the right is what you see when you right-click the slice. Things I have tried so far:

  • Control Panel > System > Advanced system settings > Performance > Settings. Enable Peek is off.
  • Control Panel > Taskbar and Navigation. Use Peek to preview the desktop when you move your mouse to the Show desktop button at the end of the taskbar is Off

Solution 1:

It is possible to remove the show-desktop slice using the free app 7+ Taskbar Tweaker

To install with Chocolatey: choco install 7-taskbar-tweaker

Use the tweak called Hide the “show desktop” button:

enter image description here

Solution 2:

Inspired by the answer by ChrisB, here is an AutoHotkey script that hides the button:

Control, Hide, , TrayShowDesktopButtonWClass1, ahk_class Shell_TrayWnd

If using AutoHotkey v2, the syntax is:

ControlHide("TrayShowDesktopButtonWClass1", "ahk_class Shell_TrayWnd")

(To use: Install AutoHotkey, save this to a .ahk file and doubleclick it. You can also add a shortcut to the startup folder in the start menu to have it run automatically on login.)

Solution 3:

I really don't like those precompiled closed-source tools so here is a simple AutoIt script that you can copy in your startup folder:

$hwnd = WinGetHandle("[CLASS:Shell_TrayWnd]", "")
ControlHide($hwnd, "", "TrayShowDesktopButtonWClass1")