Boot to Windows from Mac OS on a Dual Boot Mac

This article is the counterpart of my previous article, in which I created a small Windows application for users to boot to Mac OS from Windows on a dual boot Mac. In this article, I am going to show you how to create a Mac application for users to boot to Windows from Mac OS.

The whole process is more complicated than the Windows counterpart because the commands need administrator privilege to run. I created a script called boot-to-windows.sh and placed it in /usr/sbin.

sudo /usr/sbin/bless --device /dev/disk0s4 --setBoot --legacy
sudo /sbin/reboot

Note that users needed to input a password when they executed this script until I modified the sudoers files. The next step is to modify /etc/sudoers and add the following two lines:

%everyone ALL=NOPASSWD:/usr/sbin/bless
%everyone ALL=NOPASSWD:/sbin/reboot

With these two lines in place, users can just run the script without needing to enter their passwords.

In order for the users to run this script, they have to run Terminal application and enter the script name to run it. Most Mac users have not used the Terminal application, and it would take a lot of effort to educate them about how to run that script. Therefore, I created a helper application to run that script. Invoke  AppleScript Editor and enter the two lines as listed.

display dialog "Please save all files and click on OK to continue." with icon caution buttons {"OK"}
do shell script "/usr/sbin/boot-to-windows.sh"

Save it as an Application. In addition, you can find a Windows logo to  make your app more appealing.


Finally, copy the application to this folder:

/System/Library/User Template/English.lproj/Desktop

Note that this is for the systems using English as the main language. If yours is different, you have to put it in the right language folder. The purpose of this step is for any new user home directory created with this application on the desktop.


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.


Be the first to comment

Leave a Reply