Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

From Windows back to OSX is fairly easy. What I would like is a few less steps to get from OSX to Windows. Currently I launch system preferences -> startup disk - then select the bootcamp partition and press restart.

Being completely new to OSX it seems to me that a one-click action on the dock should be possible with some sort of automation scripting. Howerver I know nothing about OSX (yet) and how that works. First, is such a thing possible, and second please provide some tutoral links for such automation system.

share|improve this question
What was the "fairly easy" way from windows? Just opening the bootcamp tray? –  noelicus Jan 28 at 9:36
@noelicus Yes, right click the bootcamp icon and pick Reboot in OS X. It may be interesting to know that since this original post I have moved away from bootcamp to parallels (which on a late 2013 iMac (32GB ram, 3TB fusion etc...) it's really a much better environment. Now just a two finger swipe back and forth between the two Operating systems. –  Ralph Shillington Jan 28 at 11:29
It seems there's no way of doing a "boot once to OS X". That bootcamp menu in windows seems to change the permanent start-up. On another note, I have installed parallels also. Very cool, but slower than a native boot! –  noelicus Jan 28 at 15:50

7 Answers 7

up vote 12 down vote accepted

Write a shell script that does this

# tell OSX to change the boot disk 
# nextonly just for the next time - without the default would be Windows
/usr/sbin/bless -mount /Volumes/BOOTCAMP -setBoot  --nextonly  
# reboot
/sbin/shutdown -r now

This can be called from a terminal window

sudo bootcamp

The use Automator to call this via an apple script and save as an application

on run {input, parameters}

    do shell script "/Users/mark/bin/bootcamp" with administrator privileges

    return input
end run
share|improve this answer
Just keep in mind that when you click on this script, you wont have the chance to save any unsaved work from any application. The system WILL reboot your machine whatever the cost! –  nuc Mar 3 '11 at 21:36
Shouldn't it be --mount /Volumes/BOOTCAMP --setBoot --nextonly (notice double dashes before parameters)? –  Aldekein Nov 15 '14 at 20:41

Another way to get from OS X to Windows quickly is to use Bootchamp, which adds a menu bar item like this:

enter image description here

For my Windows-booting needs Bootchamp has worked well.

(I learned about it from a similar question on Super User I once asked.)

share|improve this answer
BootChamp doesn't work with certain setup and it will take up additional seconds to when booting up the computer. –  aeroxy Nov 29 '14 at 17:15

Hold while booting, you'll get a prompt to choose which OS / drive you want to boot from!

share|improve this answer
This is not what he asked, it's definitely not "quick" nor "automated" nor "one-click". –  Lohoris Mar 3 '11 at 16:54
@looris sometimes there's no need to re-invent the wheel.. –  nuc Mar 3 '11 at 21:37
@nuc With 38K views, I'd say there is. Lohoris has the right of it. –  bpcookson Aug 23 at 20:16

I'm really fond of rEFIt.

rEFIt is a boot menu and maintenance toolkit for EFI-based machines like the Intel Macs. You can use it to boot multiple operating systems easily, including triple-boot setups with Boot Camp. It also provides an easy way to enter and explore the EFI pre-boot environment.

The OP seems to be interested about an OSX-to-Windows only command, so I guess this is not exactly what he wants. Still, I find rEFIt much easier to work with: if I want to go from one OS to another, I just need to reboot and then choose the OS I want.

And if you ever need to work with 3 (or more) OS'es, you will see rEFIT is a much better option...

It also allows you to boot up from an external hard drive or a pen drive, which is a very nice bonus.

Edit From the rEFIt page:

2013-03-29: As you may have noticed, rEFIt is no longer actively maintained. Please check out rEFInd, a fork that is maintaned and under active development.

share|improve this answer

It seems this script from SuperUser handles the closing of open windows (and stopping the scheduled restart if user presses 'cancel'):

do shell script "hdiutil unmount /Volumes/<Windows_Partition> -quiet"
do shell script "bless -device /dev/disk0s3 -legacy -setBoot -nextonly" with administrator privileges
tell application "Finder" to restart
share|improve this answer

Quick boot does it nicely. It's in the menu bar.enter image description here


share|improve this answer

I wanted to use AppleScript instead of BootChamp since I had a problems with an always-running webapp when it resumed state when returning to OS X instead of launching regularly. Trying to bless the volume from an AppleScript did not work on my iMac with a 3TB fusion drive so rebooting after the bless would lead to an error screen "NO BOOTABLE DEVICE - INSERT BOOT DISC AND PRESS ANY KEY".

What I had to do was bless the HDD's EFI disk id with the -device switch, mount the BootCamp volume with the -mount switch and skip the -legacy switch. For me the HDD's EFI partition disk id was disk1s1 but you can verify yours by running diskutil list in terminal and look for the EFI device from the HDD (not the SSD).

I also wanted to do a "clean" restart so my applications would not resume when returning to OS X so I created an AppleScript that quits specific apps before continuing to the bless and reboot:

    set apps to {"Safari", "Google Chrome", "Mail", "Twitter"}
    repeat with thisApp in apps
        tell application thisApp to quit
    end repeat
end try

delay 2

do shell script "bless -device /dev/disk1s1 -mount /Volumes/BOOTCAMP -setBoot -nextonly" password "YourPassWordHere" with administrator privileges
tell application "Finder" to restart

You could skip the part about the password if you don't want to store your admin password in the script in plaintext.

If you put the script or an alias of it to ~/Library/Scripts and enable the Script Menu from Script Editor's preference you get an easy way to run it like with BootChamp.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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