If uninstalling Avast does not help then do the following.
Perform Clear CMOS.
Download from here: http://www.memtest.org/#downiso Unzip, burn the image to disk, and boot your computer from it. You can also download the version on a pendrive. (two program transitions).
A user reported encountering a blue screen error upon starting their Windows 7 computer, which subsequently restarts. Forum members requested detailed computer specifications, particularly the power supply model, and suggested pressing F8 during startup to disable automatic restarts after crashes. They advised taking photos of the blue screen for further analysis. One user recommended uninstalling Avast antivirus and performing a Clear CMOS reset. After following these steps, including using a memory testing tool from memtest.org, the original poster confirmed that uninstalling Avast in safe mode resolved the issue. Summary generated by the language model.