Boot into bootcamp applescript

Posted by: padmavyuha

Boot into bootcamp applescript - 10/15/09 09:32 AM

In case this is of interest to anyone regularly booting into their bootcamp volume, an applescript I adapted from one I found online:

display dialog "Quit all running apps and restart in WinXP?" with icon 2 with title "Come to the dark side..."
do shell script "sudo bless -mount /Volumes/<Winxx bootcamp volume name>/ -legacy -setBoot -nextonly" password "xxxxx" with administrator privileges
tell application "Finder" to restart

This will prompt you to boot into your bootcamp volume, and give you a cancel button. Just make sure you edit it to include your bootcamp volume name, and edit the xxx's to your admin password. Save in Script Editor with Run Only if you don't want anyone opening the script and reading your password! (Oh, and you can edit the message dialogue and title too, of course...)

The Finder bit at the end gracefully closes all open apps before restarting into Winxx.

It's a one-click version of opening System Preferences, clicking on Startup Disk, authenticating to get admin access, choosing your bootcamp volume, and clicking on Restart...
Posted by: zwei

Re: Boot into bootcamp applescript - 10/19/09 06:01 PM

I'll stick to holding down Option during boot.
Posted by: padmavyuha

Re: Boot into bootcamp applescript - 10/20/09 07:40 AM

But that's just so... manual smile. I like to set the restart going and go and make a cup of tea - and come back when I've missed the win-chimes...