For the Win98 machines I've made I made a batch file that I put in the startup directory that starts the front end I use for MAME, then shuts down windows when you exit the front end.
Turn on the power strip, and the computer turns on (option in bios to start when power returns). The pc boots, then runs the batch file in the "startup" folder. The batch file tells the computer:
1) Start the frontend, then wait until the user exits the frontend.
2) When the frontend program ends, run a program called "shutdown" that I found on the internet. This program automatically performs a normal windows shutdown.
Once the monitor goes dark, you can then turn off the power strip to cut power to the rest of the cabinet (monitor, marquee lights, speakers).
I don't know if WinXP uses the same command line parameters as Win98, but here is the batch file I used. By the way, to make a batch file you just open notepad, write your text then save it with a file extension of ".bat".
cd c:\mame\coctailfe
start /w c:\mame\coctailfe\launcher.exe
start c:\windows\shutdown.exe force shutdown