Don't confuse the below walkthrough as a method for changing your default OS. It is much much more than that.
Every now and then PC World writes nice articles about tips and tricks for XP and Vista. After reading all of these articles I still have not seen the best trick of all. Below is a walkthrough for a one click OS switch on a dual boot system. This is a such a nifty trick that I will be expecting a T shirt soon. Originally, after I came up with this method I posted the same walkthrough on the computerhope forums. Here [1].
Long about the first of the year I was faced with the question many of us have. Should I switch to Vista or setup a dual boot system with XP and Vista. Cautious as I am, I decided to go with a dual boot system. It didn't take me long to realize that this is a pain in the arse. Constantly monitoring my PC at startup to decide which OS I was to use, and if I wanted to switch to the other OS I had to babysit the system until I made my choice in the boot loader. Thus began my quest to setup something a little more user friendly.
Ultimately I set my sights on having a button or shortcut on each of my two desktops that would allow a single click reboot to the other OS. After reading quite a bit of the Microsoft BCD publicaton and doing some extensive research on .bat files and bootloaders I came up with this. The procedure below employs DOS, Bootloaders and a nifty little program called wizmo. At this point and time I have a shortcut on each of my desktops that once clicked upon automatically reboots the system to the other OS. This feature I couldn't live without as I am constantly using XP for work stuff and Vista for personal stuff. So, if you want a nifty auto reboot button that takes you to your other OS... READ ON. Dangerous and exciting walkthrough follows. IF this sounds like something your going to do, read this walkthrough a couple of times as making a mistake can be costly...see the last disclaimer below.
Disclaimer:
Caution be very carefull, messing with your master boot record and bcd store is dangerous and could cause your system not to boot at all, thus leading to more pain and suffering, proceed with caution.
First you have to understand how to make windows reboot with a bat file. Put the text below in notepad and save it with the .bat file extension, when in XP and you click on this it will cause a shutdown with no delay.
_XP_ = shutdown -r -t 00 (this tells xp to reboot with 00 delay) basic stuff
_Vista_= download the wizmo program below and setup the command to reboot. You end up with the wizmo.exe and a shortcut with the switch wizmo.exe reboot. fairly easy to do,_ *follow the directions*_. I put wizmo in the root of my c:\ drive just to keep it out of the way. I used wizmo because Vista does not have an easy dos type reboot command available. After reading the BCD document from microsoft it became clear that the command to reboot Vista via dos type commands would be very painfull to implement.
Thanks to changes in the way the Vista bootloader works you need to be able to identify the "GUID" of your vista install and your XP install. XP is always identified as follows {ntldr}. IF you have vistabootpro then the next part is easy, if you don't have it, then get it. vistabootpro is a nice program to have, you may need to update portions of your system to get it to run. It will tell you if your lacking anything. We use vistabootpro to easily change the default OS in the Vista bootloader. Any bootloader program that allows you to change your default OS will work for this.
here -> [3]
From vistabootpro change your default OS to windows XP. We do XP first because it has a known ID. (NTLDR) This works for us because the Vista bootloader has so many lines of data that we need to identify the line for the default OS.
Now, from a command prompt run bcdedit. If you are currently in XP you may need to copy the bcdedit.exe from your vista windows\system32 folder to the like folder in XP. This is an important step because having bcdedit.exe in your XP windows\system32 folder is critical as you won't be able to adjust your default OS from XP without it. SO... browse to your drive with Vista on it and find the bcdedit.exe and copy it to your XP install at windows\system32.
The output from BCDEDIT will have the category "windows boot manager", in this list is the "default" category. You should see {ntldr} take note of this location, you will come back to it. Next go back to Vistabootpro and change your default OS to vista. Rerun BCDEDIT and look at the default line now. it should have the string value of your GUID for vista. It looks something like this {84dd5819-b823-12ef-b2f0-444512344200} write yours down. This is not a universal number,all machines are unique and this is one i made up.
once you have this info do the following.
create a .bat file in Vista with the following commands in it. This is for the switch to XP.
bcdedit /default {ntldr} C:\wizmo.exe reboot
This changes the default os to XP {ntldr} and then tells the system to restart.
create a bat file in XP with the following commands in it. This is for the switch to Vista.
bcdedit /default {84aa1239-a823-11aa-b2f0-444123200}
shutdown -r -t 00
This does the same thing only differently. I use the same bcdedit /default command to change the default os in the vista bootloader, however I can use the simpler xp shutdown command instead of wizmo. I chose to go with a delay of 00 since if I didn't use the -t switch I got a 30 second delay by default .
Just to keep things clean and a little safer I put all the programs and .bat files in the root of my OS's drive. I then created shortcuts on my desktop to the .bat files. Adjusted the names and icons and bling I got the buttons I wanted. Here is the path to the shutdown icon I use. %SystemRoot%\system32\SHELL32.dll
Now I have two nifty shortcuts, one on my XP desktop, the other on vista. Both have custom icons and force immediate shutdown and switch to the other OS.