Skip to content

Instantly share code, notes, and snippets.

@coulterpeterson
Created October 24, 2023 13:51
Show Gist options
  • Save coulterpeterson/d2fb1b37f0a03a486ebe56f6db503b94 to your computer and use it in GitHub Desktop.
Save coulterpeterson/d2fb1b37f0a03a486ebe56f6db503b94 to your computer and use it in GitHub Desktop.
Force Windows Taskbar to Re-Hide Itself in Windows 10+

To pin to start menu, create a shortcut of the .bat file, then edit the properties of the shortcut. Then, change the "target" from something like C:\scripts\hideTaskbar.bat to cmd /c "C:\scripts\hideTaskbar.bat". That shortcut can now be pinned to the start menu for easy access 👍

REM Hide Taskbar and Kill Explorer to Make It Restart (Credit to https://stackoverflow.com/a/47202007)
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment