There is a few ways this can be done on Windows 7 and Vista using this great tool
Windows 7 & Windows Vista I found this great tool works great
http://www.thewindowsclub.com/downloads/Fix%20WU.zip
In windows xp I found the Microsoft way worked the best of reinstalling the Windows Update Agent