I've had this before and I think it was a virus. But I've run the removal tools this time and it had not fixed the problem and I have XP2 on my machine so this should include the fix anyway.
When I boot up my machine, it works fine, it gets to the log on screen then after a few minutes maybe just 30 seconds it starts the shut down process (i.e. saves settings) and powers off. I am able to log in if I'm quick enough but it still shuts downs like I've selected to shut down from the XP Start Menu everytime.
I was pointed to the following MS support page (which is to do with restarting and not shutting down) and it worked for a while. Then it started again and running this fix doesn't help any more.
Any advice is much appreciated.