I tried to boot up my computer but it freezes and the screen goes blank. I tried safe mode but when i press safe mode option it loads a few seconds and hangs up again. I tried to boot from windows disc but it loads files for a minute then hangs up again. I tried another hard drive but the same thing happens also so i dont think its a hard drive problem. Has anyone any ideas as what could be the problem

Is it a PC or a laptop?

have you tried a repair tool from windows recovery tools? or does it happen directly?

and did you set the cd rom on first boot device in the bios?

Yes i set cd rom first boot but when i try to use recovery tools the disc loads quarter of the way then hangs.

let's rule out bad memory. remove all of your memory sticks then try running with only 1 stick at a time until you find the bad memory stick. if you cannot find a bad memory stick it could be a badly installed processor heatsink/fan which is causing your system in overheat in moments or a bad video card or motherboard. memory is often the easiest thing to test. let us know what you find.