I can keep it on safe mode all day, and it doesn't turn off, which leads me to believe its not the power supply like someone suggested.
My computer turns off at the exact same spot every time, right after the windows XP loading screen, before it would go into the login screen. It's not virus related, because I reformatted and nothing changed. I tried removing everything I could, video card, leave a different stick of ram in there one at a time, nothing helped. I made sure all the cables were connected, what could be causing this? I am stumped.