Try this if Win XP.
There's a setting buried in Windows XP that tells your computer to restart when a system error occurs. If you turn off that option, you may solve your automatic reboot problem.
Click Start, then open
Control Panel
Click
Performance and Maintenance
Click
System
Click on the
Advanced Tab
Click
Settings in the Startup and Recovery section
Uncheck
Automatically Restart in the System failure section Note that this may prevent the system from restarting, but it can also mask the true problem. As an alternative to this measure, consider what has recently changed on your system. If you have installed new hardware or software, remove it and see if the annoying restart persists. Sometimes downloading the latest driver software from the manufacturer's website will fix hardware incompatibility problems that cause restarts.
http://askbobrankin.com/computer_restarts_itself.html