Have you run a Virus scan ?
CMD.EXE running on reboot can be caused by a Backdoor Trojan.
When the CMD box appears can you take a screenshot of it,and post it here.
As a temporary fix,type msconfig in the run box and press enter.
On the Startup tab,look for cmd.exe and uncheck it.Click apply and reboot.When XP starts reloading you'll probably get a warning message saying you have chosen a Selective Startup,just ignore it.