To restore the Windows Vista bootloader, you must first boot off your Windows Vista installation DVD.
If you have one of the many OEM computers that didn't come with a Vista installation disk, you can get the same effect with a Vista recovery disk, which you can download or create from another Vista/7 computer (see this page and this tutorial).
When you get to the Regional settings, select your Location/Keyboard setting then click next.
On the next page you must click on "Repair your computer."
On the next page, if it finds your Windows Vista installation, make sure it is UNSELECTED before clicking next.
Then click on "Command prompt". From there, type in the folowing:
Now close the two windows and click "Restart."
Take out your Vista DVD and hopefully, you will be left with your Windows Vista Bootloader.
If you dont want also to restore Ubuntu
Boot into the Ubuntu 12.04 Live CD and click "Try Ubuntu without installing":
After the desktop is loaded, we need to mount the root partition so that we grant the live cd user read/write permissions on your system files and folders. Let's first identify the partition where Ubuntu is installed with this command:
sudo fdisk -l
Note: The Terminal can be started by pressing CTRL+ALT+T.
The Ubuntu partition we will work on will be labeled with the word "Linux" as shown in the screenshot given below:
Run now this sequence of commands to mount the root partition:
sudo mkdir -p /media/ubuntu
sudo mount /dev/sda1 /media/ubuntu
Then you need to mount these system folders to use them on your current desktop environment:
sudo mount --bind /dev /media/ubuntu/dev
sudo mount --bind /proc /media/ubuntu/proc
sudo mount --bind /sys /media/ubuntu/sys
Now chroot into your hard drive with this command:
sudo chroot /media/ubuntu
You have now read/write permissions on your root partition. To install GRUB2, you need to use one of these two commands:
grub-install --root-directory=/media/ubuntu /dev/sda
Note: the "sudo" is not required since you are logged in as root now. Also keep /dev/sda as is.
If the installation is successful, you will get these outputs:
Installation finished. No error reported.
Update GRUB2 with this command:
Now Remove the Ubuntu installation CD and reboot your system to see if the GRUB2 boot menu is restored or not.