I get this "Windows has encountered a problem and has to close" sometimes when I'm turning off my browser. Apparently, Windows thinks there's a problem with my turning it off.
Recommend you download/install http://www.piriform.com/ccleaner
It's free and it can clean up your temp files and the registry.
I use it to keep my computers clean and I think I might solve your problem.
It least it's a good first step.