Once I could install W7 on it, I tried installing all the necesary drivers but it restarted again. Any idea?
I understand that your system is rebooting randomly during the installation of the operating system.
In regards to your inquire, this behavior is usually caused by a power problem or incompatible parts.
Make sure that the RAM memory being used is 1.5v, that you are using the latest BIOS version and that the power supply is sufficient for your configuration.
If problem continues, the next step will be to try swapping parts.