Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to create a shortcut (that I can place on the Dock, perhaps) that will restart OS X with the Bootcamp partition?

This would be similar to going into System Preferences/Startup Disk and then choosing the partition and hitting Restart. I don't want to use Automator to do this unless I can do it without popping up a bunch of windows.

The funny thing is that Windows has a tray shortcut for this, but I've found nothing equivalent on the OS X side.


share|improve this question

closed as off-topic by Iain, HBruijn, Ward, MadHatter, EEAA Jul 29 '15 at 2:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Iain, HBruijn, Ward, MadHatter, EEAA
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 3 down vote accepted

There are a couple options:

One - when you restart you can hold the 'Option' key down and then choose Boot Camp - however this is a temporary selection so if you restart again it will start back up in OS X (or whatever the selected startup disk actually is).

Two - You'll need to find out the disk ID by running df -k - more than likely it is /dev/disk1s3 if you have partitioned your hard drive but you'll want to double check. So change the '#'s in the following command to the appropriate numbers:

sudo umount /Volumes/NAME_OF_YOUR_WINDOWS_DRIVE
sudo bless -device /dev/disk#s# --legacy --setBoot
#You could use -folder but this assumes the drive is always mounted and writeable
#Then a slightly cleaner restart than shutdown -r (which sends a kill message)
osascript -e 'delay 1
 tell application "System Events" to restart' &

You can save that as part of a shell script or use Platypus to create an actual runnable application that will run the shell script for you.

Additionally there are other options listed on MacOSXHints

share|improve this answer
You may also want to look at this earlier hint from MacOSXHints: – Clinton Blackmore Jun 23 '09 at 16:09
I always miss hitting the Option key at startup :) – Corey Ross Jun 23 '09 at 16:19
Works like a champ! I wish I could give a second upvote for the alternative suggestion to 'shutdown -r' – Corey Ross Jun 23 '09 at 16:22

I feel that the easiest way to do this is by opening up Script Editor... pasting the following in it. Which is a script that will restart the computer into windows. Make sure you change the password to yours though. all you have to do is double click it and it will automatically do everything for you. Leave everything like it is except for the line that says set adminpass to "****" - change the asterisks ( * ) to your password.

set adminpass to "*****"

tell application "Finder" set iconPath to (get name of startup disk) & ":Applications:Utilities:Boot Camp" as alias end tell

set askRestart to display dialog "Restart in Windows?" buttons {"Cancel", "Restart"} default button 1 with icon iconPath set doRestart to button returned of askRestart

if doRestart is equal to "Cancel" then quit end if

if doRestart is equal to "Restart" then do shell script "bless -mount /Volumes/BOOTCAMP/ -legacy -setBoot -nextonly; shutdown -r now" password adminpass with administrator privileges end if

after this, go to file, export- name the file whatever you want- ex. BootToWindows.scpt. In the left, click desktop, so it saves it there. at the bottom, change the file format to Application so that it runs when clicked instead of opening. if you ever need to edit it, you can right click the application, click show package contents, navigate to Contents, Resources, Scripts, and double click main.scpt, and it will open it in the scripts editor for editing.

share|improve this answer
Kind of an old post, but figured I'd update it for a newer audience.. – Tristan Dow Jul 27 '15 at 5:18
This is not a YouTube promotion service. You can put your personal information in your profile. – Deer Hunter Jul 27 '15 at 8:39

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