How to Stop sidebar.exe Using Lots of Memory (Edited 14 May 2011)

One of my readers, TED has made a suggestion as to a hack fix to the sidebar.exe memory problem (as documented in my blog post Windows sidebar.exe Memory Leak). With some spare time at the moment, I’ve been able to implement his suggestion and confirm it works.

I’ve written a batch script, and confirmed this works in Windows 7 (should work in Windows Vista too). I created a batch file called restart-sidebar.bat, and stored it in c:\users\brendan – contents of the file below:

@echo off
taskkill /im sidebar.exe /f
echo This script will now sleep momentarily…
TIMEOUT /T 2
echo Starting sidebar.exe now…
start sidebar.exe

The idea is it will kill the process called / task with the image name of, sidebar.exe, forcefully. It will then wait two seconds before starting the process again.

To complete the setup, create a new scheduled task specifying the path to your newly created batch file (mine was c:\users\brendan\restart-sidebar.bat). Run the scheduled task as your own user. I have it scheduled to run once a day at 5pm. I prefer to have it run when I’m not using the computer, more of a scheduled maintenance task that goes on behind the scenes. If you find that’s not enough, schedule it to run a few times a day.

For your information – I’ve encountered on only a few occurrences problems in the past when shutting. The sidebar process has stalled the shutdown procedure and Windows has forcefully killed the process. On login again I’ve lost a few sidebar settings. While I’ve not encountered this running the above batch script, it’s possible you may encounter this. If you’re concerned about it, drop the /f from the taskkill line in the above script (as to not force it) and increase the timeout value from 2, to up to 20 seconds to allow it to safely exit.

Downsides / Cons - I haven’t been able to find something to force the batch file to run in a minimised window (so it pops up and runs as a black command prompt window). This I’m a little bit disappointed with – you could perhaps create a shortcut to the batch file and set the properties on it to start minimised – however I’ve not confirmed this works. – See “Edit 14 May 2011″ below which overcomes this problem.

Advantages / Pluses - It’s a simple and easy fix. Avoids the pain of closing all your programs and restarting / logging off. Runs in seconds and doesn’t require administrative privileges to run.

Edit 14 May 2011 - I recently received an interesting email sent via the contact page. Ray, a fellow sysadmin in the trenches, had come up with a beautiful revision to my own code above. Using the below Windows Script in a vbs file (e.g. restart_sidebar.vbs) run on the same scheduled task as above, it accomplishes the restart of the sidebar without any extra windows or user interaction – it runs silently in the background (like a ninja). I’ve tested it for a few days and it runs beautifully. Thanks Ray, and good work!

‘—————————————————
‘ Author: Ray Flores (raymond.l.flores@gmail.com)
‘ Written May 2011
‘—————————————————

Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “C:\Windows\System32\taskkill.exe /im sidebar.exe /f”, 0, True
WshShell.Run “C:\Windows\System32\timeout.exe /T 2″, 0, True
WshShell.Run “sidebar.exe”, 0, True

Similar Posts:

VN:F [1.9.22_1171]
Rating: 4.2/5 (5 votes cast)
VN:F [1.9.22_1171]
Rating: +15 (from 19 votes)
How to Stop sidebar.exe Using Lots of Memory (Edited 14 May 2011), 4.2 out of 5 based on 5 ratings
facebooktwittergoogle_plusredditpinterestlinkedintumblrmail
Tags: , , .

5 Responses to How to Stop sidebar.exe Using Lots of Memory (Edited 14 May 2011)

  1. Pingback: Windows sidebar.exe Memory Leak | SysadminSpot.com, SysAdmins, Server Administrators and IT Consultants

  2. Adam Taylor says:

    Just a word to anyone out there trying to copy and paste this into a notepad document on your computer to create this VBS file, you will need to delete all of the quotation marks in the code above that were pasted from this website and re-enter them manually. Copy/Paste will give you an error when you try to create the .vbs file stating that non-standard ANSI characters exist and the script won’t run. Just delete the quotation marks one at a time and immediately type a ” from your own keyboard. I hope this helps anyone looking to use this script as I am. And thank you very much OP for this script!! It works GREAT once you change the quotation marks. ;)

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  3. Brendan says:

    Adam, you’re absolutely correct! Despite my best efforts to cleanly post the code, technology has tried to be smarter – and failed.

    Thank you for taking the time to let me know. :)

    VN:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  4. Lucas Keasbey says:

    I found that by setting the priority of sidebar.exe to low by simply right clicking it in the Task Manager, it brought the memory usage down to ~7000K

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  5. Annagranny says:

    Since my last (always manual) update of Windows on March 31, 2014, sidebar.exe kept using lots of memory and constantly counting… Although I have not used IE since last summer, I saw in the comments that IE9 could cause such problems. So I checked IE, and sure enough, it turned out that – without my intention – IE8 updated itself to IE9. Although I opted out from the Bing Bar immediately, it was still sitting in the Programs folder. As soon as I removed the Bing program from the Programs list, memory returned to its normal function! :)
    (my OS is Vista, but my Office is XP)
    I use FF, but did not want to remove IE altogether for the sake of convenience, as I need to use it from a different IP address about once or twice a year.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>