There was an XP Repair option available on the WinXP installation CD to reinstall XP over itself, which would in most cases not disturb your data or installed programs. Vista has an option like this also, described here:
http://vistasupport.mvps.org/repair_a_vista_installation_using_the_upgrade_option_of_the_vista_dvd.htmThe difference between XP repair and Vista repair is that you must be able to boot into Vista in order to repair it, while the XP repair option was chosen in XP's Recovery Console, which meant that XP didn't necessarily have to be still bootable.