and when it restarts, it doesn't give me an error.
I never said it would give you an error. You still need to check your voltages with a program like motherboard monitor 5, or SiSoftware Sandra to make sure your PSU's voltages aren't fluctuating heavily which like I said is a sign of a dying PSU...also...
You need to go and download the program called 'memtest86+' just google it and you'll find it as I don't have a direct link. You put this program on a bootable floppy or CD, and instead of booting from the Hard drive and into windows, it runs this little program and will test your RAM for errors which also could be a cause of random restarting...so you need to:
1.) Check Voltages
2.) Download memtest86+ and run it, check RAM for errors.