You gave enough info, you could have also said I tried to repair XP after installing any linux distro...
Microsoft doesn't care that you have grub/lilo or any other bootloader installed and will simply remove it and install the windows bootloader. There are a few solutions to solve this problem.
The first is use the SuperGrub Boot Disk:
http://www.supergrubdisk.org/
Another option, but a bit more difficult, is using a liveCD (I would say ubuntu or something, or maybe even fedora/redhat, but I haven't tried those). When you use a liveCD you have to follow the following steps:
(I assume everything below is done as root in a terminal)
1. mount your linux partition; for example: mount /dev/sda2 /mnt/sda2
2. Mount /dev, /proc and /sys to the correct directories of your original system
mount --bind /dev /mnt/sda2/dev
mount --bind /proc /mnt/sda2/proc
mount --bind /sys /mnt/sda2/sys
3. The next step is going back to your orginal machine.
chroot /mnt/sda2
Now everything you do, will be applied to the linux version on your sda2 device instead of on the CDROM.
4. Reinstall grub
grub-install
5. If you want to leave the chroot environment, you have to do the following steps:
umount /proc (Not 100% sure this is required)
CTRL+D (The keycombination)
umount /mnt/sda2/dev
umount /mnt/sda2/proc
umount /mnt/sda2/sys
That should reinstall the grub on your MBR. But the supergrubdisk is a lot quicker & easier :D
Hope this helps