Firstly to stop it doing this you can switch off the auto reboot option in:
Control Panel/Admin Tools/Services/Remote Procedure Call.
go to the recovery tab and make sure it doesnt say "reboot machine" anywhere.
Then when you have stopped it rebooting, i would do a full virus check including worm. I think this problem was related to a windows issue that had a worm virus.
YOu may need a special removal tool, but i cant recall what it was, so you may need to do a search on the windows site.