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
add comment

5 Answers 5

up vote 11 down vote accepted

Write a shell script that does this

#!/bin/sh
# 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
4  
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
add comment

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
add comment

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

share|improve this answer
7  
This is not what he asked, it's definitely not "quick" nor "automated" nor "one-click". –  Lohoris Mar 3 '11 at 16:54
5  
@looris sometimes there's no need to re-invent the wheel.. –  nuc Mar 3 '11 at 21:37
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.