Your power supply is shutting down to prevent an overload. Check your motherboard for "bad caps" if it's at least 3 years old; otherwise, get a better power supply. Do not go by the wattage; cheap power supplies are light in weight and overstate their load limits. I would use only corsair, antec, ocz, pc power and cooling, seasonic, or enermax. These power supplies are more efficient; look for a green rating of at least 80%. List your system specs including video card if you want specific recommendations.
If i do the harddisk scanning, the power supply was also shutting down. Is it the same problem?