Boot Into Windows With Quicksilver
Matt Cone May 14, 2007 Tutorials Mac Apps Developer
If you have an Intel Mac with a Boot Camp partitioned hard drive, you’re probably getting sick of restarting your Mac again and again, just so you can hit the option key to select your Windows partition. In this article, we’ll show you how to create an AppleScript and Quicksilver hotkey that will let you easily restart your Mac and boot into Windows - without the hassle of selecting your partition!
The first step is to create an AppleScript that will tell your computer you want it to restart and boot into Windows. (You can download our AppleScript here.) Credit for the idea for this script goes to a poster over at macosxhints.com. This script is very simple, and will execute two commands:
do shell script "bless -mount /Volumes/WINDOWS/ -legacy -setBoot -nextonly" with administrator privileges
do shell script "shutdown -r now" with administrator privileges
The first line, using the
bless command, sets your system’s startup disk to whatever appears after
-mount - in our case, our Windows partition is located at
-nextonly flag means that the change will only apply for the next startup, after which your computer will return to booting into OS X as normal. The second line simply tells your computer to restart, so that when you execute the script your computer will immediately begin shutting down and then booting into Windows.
Pasted into Script Editor and compiled, your script should look like this:
Save your script somewhere. At this point, you can choose to activate it anyway you like. You could put it in your dock, or make an alias and put it on your desktop. In our opinion, none of these options are as efficient or flashy as where we’re going next: Using Blacktree’s free application launcher Quicksilver to hotkey the script.
The first step in making the most of your soon-to-be-created Quicksilver trigger is to change the icon of your AppleScript. Right now, it sports a generic AppleScript icon, which really tells us nothing about its true function. Go grab a more informative icon from the Internet - such as the Windows icon in this icon set by Rupert Fisch. To apply the icon to your script, bring up the “Information” window on both items. Select the icon of the Windows icon in its information window and copy it. Then, select the icon of your script (shown below) and paste. If you have problems, check out Macinstruct’s Customize Your Mac’s Icons.
When you’re done, your script’s icon will look much more appropriate:
Now it’s time to create a trigger that will run your script and take advantage of its new aesthetic. Open up Quicksilver’s Triggers preference pane and create a new trigger to perform the command “Run” on your script. Open up the new trigger’s info drawer to make a few important adjustments to how it works. To avoid setting it off with an accidental keystroke, specify a delay - the time you have to hold down the key combination before the trigger will activate. Lastly, make sure to check the “Show Window” box. When you’ve finished, the drawer should look like this:
Now, whenever you press the hotkey you specified, a slick Windows bezel will pop on to your screen:
If you hold the hotkey and then enter an administrator password at the prompt (note the
with administrator privileges in the AppleScript), your computer will automatically restart and boot into Windows. This means that you will never again waste time watching that grey startup screen while holding down the option key!
Subscribe to our email newsletter
Sign up and get Macinstruct's tutorials delivered to your inbox. No spam, promise!