Look in your startup folder, and use something like Spybots to snoop through your registry startup to find what is calling "shutdown".
It'll be a batch file, or direct link to shutdown.exe (located in \WINDOWS\SYSTEM32 directory)
Shutdown shuts down the computer
The "-t 00" says to begin shutdown in 00 seconds (ie: immediately)
The "-s" means to shutdown (as opposed to shutdown + restart)
The "-f" means to force everything to close immediately
If all else fails, open start/run/cmd.exe and type "rename C:\WINDOWS\SYSTEM32\shutdown.exe C:\WINDOWS\SYSTEM32\shutdown.exe.backup" ... Certainly not going to fix things, but it'll stop you having to click the X real quick on startup

Then just rename it back to shutdown.exe when youve had someone fix the problem for you if you cant do it yourself.