Since the BDD 2007 timeframe there has been an issue in BDD/MDT when doing a build and capture of Windows XP/2003. Sometimes the Task Sequence / Sysprep just hangs, until you move the mouse. Here is the fix.
Note: This only happens when building reference images of Windows XP or Windows Server 2003.
The solution to the problem is to run an AutoIT script that automatically moves the mouse every now and then. It needs to be run as an exe, but I provide the AutoIT source code so you can see what the files does. Just call the .exe file before the Sysprep action in the task sequence.
Note: The script originally came from the Deployment Fundamentals – Volume 3 book (written by me, Chris Nackers and Mikael Nyström).