it depends on which temp folders you are referring too... if you are talking the user's temp dir, it would be (for XP)
CODE
%systemdrive%\Documents and Settings\User\Local Settings\Temp
but generally speaking, that folder should be pretty empty to start off. If you are talking about your specific folders you used during installation of your programs, you could put the following code in your cmd file
CODE
RD /S /Q %systemdrive%\setup\applications
just continue on that idea for all the folders you need to delete. Obviously anything contained in the "applications" folder in my example would be deleted
hope that helped