I have been struggling with this issue it seems like forever since i bought a used computer. this fixed everything for me.
I have verified I have no viruses, all drivers are up to date, etc.. I have tried everything i that I could find by searching the web all to no avail.
This is what finally worked for me.
Type mscongfig in the search programs and files box.
click on the Boot tab
go to Advanced Options...
Uncheck the boxes for Number of Processors and Maximum Memory.
My computer now runs as it should.
Hope it works for you.