Option Explicit Dim objWMIService, colItems, objItem, sCurrUsrName Dim colProcList, objProcess, sNameOfUser, sUserDomain, sWel, sKey, sKey2 Dim colProperties Dim WshShell: Set WshShell = CreateObject("WScript.Shell") sKey = "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\" sKey = sKey & "CurrentVersion\TrayNotify\" sKey2= "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\" Set objWMIService = GetObject ("winmgmts:\\" & "." & "\root\cimv2") ExitExplorerShell WScript.Sleep(3000) ClearOverflowIcons WScript.Sleep(2000) StartExplorerShell Sub ExitExplorerShell() 'Get curr. user name Set colItems = objWMIService.ExecQuery("Select * From Win32_ComputerSystem") For Each objItem In colItems sCurrUsrName = objItem.UserName Next 'Restart the Explorer shell Set colProcList = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = 'Explorer.exe'") For Each objProcess In colProcList colProperties = objProcess.GetOwner(sNameOfUser,sUserDomain) If UCase(sUserDomain & "\" & sNameOfUser) = UCase(sCurrUsrName) Then objProcess.Terminate(1) End If Next End Sub Sub ClearOverflowIcons 'Clear the Customize Notifications dialog On Error Resume Next WshShell.Regdelete sKey & "IconStreams" WshShell.Regdelete sKey & "PastIconsStream" WshShell.Regdelete sKey2 & "IconStreams" WshShell.Regdelete sKey2 & "PastIconsStream" WshShell.Run "reg.exe delete " & """" & "HKCU\Control Panel\NotifyIconSettings" & _ """" & " /f" On Error GoTo 0 End Sub Sub StartExplorerShell WshShell.Run "explorer.exe" End Sub Msgbox "TrayNotify Clear! Reboot Required!" & Chr(10) & Chr(10) & sWel & _ Chr(10), 64, "Taskbar Corner Overflow icons have been reset."