While Windows XP shutdown, Windows XP may popup a notice to end non-respond programs which are running. The pop-up notice let you choose what to do for your non-respond programs. I guess that you must click End Task for solving the Windows shutdown problem. Sometime you have too many non-respond programs and you have to click End Task one by one. That is a waste of your time. I suggest that you should set Auto End Tasks to end non-respond programs automatically. Now let you follow these steps.
Go to Start > Run.
Type regedit in the Run box then press Enter.
In the Register Editor window go to the path HKEY_CURRENT_USER\Control_Panel\Desktop
Double Click on AutoEndTasks which is in your right hand.