Site icon Winhelponline

How to Reset Taskbar Settings to Windows Defaults

Corruption of Taskbar settings can cause it not to retain your customizations, such as auto-hide, icon size, or toolbar preferences. Also, in some situations, the taskbar may not be docked to a particular position. This post has a script that quickly resets the taskbar configuration for your user account to defaults.

Fig 1: Corruption of Taskbar settings, causing a gap at the bottom.

Reset Taskbar to Default

Here is a VBScript that will clear your Pinned taskbar shortcuts, remove the toolbars added to Taskbar, and clears the past notification icons. The script can be used on Windows Vista, 7, 8, 10, and 11.

'Resets the Taskbar configuration
'This script can be used in Windows Vista, 7, 8 and 10.
'© 2016 Ramesh Srinivasan
'Created on March 24, 2016; Reviewed on April 24, 2021.

Set WshShell = WScript.CreateObject("WScript.Shell")
strRegPath = "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\"
strkey0 = "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify\"
strkey1 = strRegPath & "StuckRects2\"
strkey2 = strRegPath & "StuckRects3\"
strkey3 = strRegPath & "Taskband\"
strkey4 = strRegPath & "Streams\Desktop\TaskbarWinXP"

sMsgTitle = "Taskbar Settings Reset"
sMsgCompleted = "Taskbar settings have been reset."


Sub ExitExplorerShell()
	strmsg = "Explorer Shell will be terminated now. Click Yes to continue."
	rtnStatus = MsgBox (strmsg, vbYesNo, sMsgTitle)
	If rtnStatus = vbYes Then
		For Each Process in GetObject("winmgmts:"). _
			ExecQuery ("select * from Win32_Process where name='explorer.exe'")
	ElseIf rtnStatus = vbNo Then
	End If
End Sub

Sub StartExplorerShell()
	WshShell.Run "explorer.exe"
	strWelcome = "For more tips and articles on Windows, visit us at:" & Chr(10) & Chr(10) & vbtab & ""
	MsgBox "Completed!" & Chr(10) & Chr(10) & strWelcome & Chr(10),64, sMsgCompleted
End Sub

Sub ClearTaskbarSettings()
	On Error resume Next	
	WshShell.Regdelete strkey0 & "IconStreams"
	WshShell.Regdelete strkey0 & "PastIconsStream"
	WshShell.Regdelete strkey1
	WshShell.Regdelete strkey2
	WshShell.Regdelete strkey3
	WshShell.Regdelete strkey4
	On Error goto 0
End Sub

  1. Download taskbar_reset.vbs or create the script file by manually copying the above code to Notepad.
  2. Double-click the script file to run it.
  3. Click Yes to continue.

The script takes 5 seconds to execute (including the sleep time). It will restart Explorer and reset the taskbar to default.

You need to pin the icons again. If you had added additional toolbars on the taskbar, you’d need to re-add them.

Related article: Fix The Gap That Appears At The Bottom Of Taskbar Icons

Exit mobile version