Can I run Windows XP from a USB flash drive? [duplicate]

You might want to take a look at BartPE. (Be prepared for spending a few hours, though.)

If Windows 7 would work instead of Windows XP, you might also want to take a look at the Windows Automated Installation Kit, with which you can build Windows PE and put it on a flash drive.

The reboot.pro page might also be helpful.