first make a image of windows XP(32 or 64 bit)
i used ULTRA ISO image creator
now format ur pen drive (better to use 2gb one)
i used 2gb transcend pen drive
open win XP image using ultra iso
there is option called extract, select extract to pen drive
now all the files of XP goes to ur pen drive
this is done because if u try to copy files to pen drive directly then some files will be missed
after extraction reboot ur system and enter ur bios (F2 for intel board and DEL key for most other boards)
go to boot menu and boot priority and select FLASH DEVICE to be first boot
press F10 and Y
system will reboot and now it will boot directly from ur pen drive....
I tried this only for XP.
This might work for Win 7
may require 4gb pen drive........
I hope this might help u..........