1

I have Windows 7 and 8 installed on two partitions on an SSD, with 7 as the default. I sometimes have to switch to windows 8 to do some work. What I would like is to create a commandline script or something, which when run, will restart the computer and boot into the second OS. Is something like this possible? I know I can just use the boot menu, but I can't help thinking there should be a cooler way to do this.

2
2

Without being in front of a Win7 or Win8 machine at the moment, I assume you could build a batch script similar to this... (Replace <id> with the identifier of the OS you want to boot)

bcdedit /default <id>
shutdown -r -t 02

To find the ID of the OS you use the bcdedit /enum command.

1

You can use a program called iReboot. It is a lightweight program (400kb memory usage according to the website) which runs in the background on the taskbar. You click the icon, and choose the OS you want to boot in.

enter image description here

Note: iReboot is a WINDOWS ONLY program, so you can use it to boot into Linux OSes but you can not boot to windows from Linux. Also, I'm just a happy user of the program, no connection with it.


If you really want a command line option, iReboot 2 has command line scripting support.

Syntax:

iReboot.exe [/sticky yes|no] [/reboot yes|no] /target {guid}

/sticky: Whether to make this entry the default indefinitely or only for the next boot

/reboot: Reboot after changing the selection, or just apply the changes upon next boot

/target: The BCD {ID} for the entry you wish to boot into

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.