How to Configure the Default OS to the Current OS on Multi-boot Systems

Sunday, February 15, 2009

Here's a handy tip to automatically configure the default OS if you have a computer with a dual or multi-boot operating system.
Normally, when you configure a system with two or more operating systems, you select the default OS within Windows using Advanced System Settings > Startup and Recovery > System Startup. Whenever the computer is restarted it will boot to this OS automatically when the timer runs out.

If you're like me, you tend to work with one OS for a while and through several restarts. If the default OS is Windows 7, but I'm working with the Windows Server 2008 R2 OS, the computer will always default to Windows 7 on a reboot unless I manually select Windows Server 2008 R2. This is annoying since reboots are the time I usually use to get a cold drink or go to the bathroom.

Here's how to configure the computer to change the default OS to the current OS:
  • Create a new batch file called DefaultOS.bat using Notepad

  • Add the following line:
bcdedit /default {current}
  • Save the file to the Windows directory on each operating system drive

Now do the following in each Windows OS:

  • Run gpedit.msc to edit the Local Computer Policy

  • Expand Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)

  • Double-click Startup in the details pane

  • Click Add to add a new script

  • Browse to %WINDIR%\DefaultOS.bat and click OK

  • Click OK to close Startup Properties

  • Repeat these steps for each Windows operating system

Now Windows will configure the default OS to the current OS whenever the computer starts up. You can also apply this Startup script to all computers in the domain using Group Policy. It will not affect single boot systems.