Hands-free reboot?
December 31, 2008 6:52 PM   Subscribe

I have an Intel iMac, and have partitioned off a Boot Camp drive that contains Windows XP. Is there any way to restart the computer into Windows without having to hold down the Alt key?

I generally run OS X, but sometimes boot up Windows for various applications. I'll go to the apple menu, select "restart", wait for the shutdown and then I have to hold down the Alt button (I have a Microsoft keyboard; maybe the Mac keyboard key is something else), and then I choose which partition to boot, Mac or Windows.

I want to skip those last steps. I know I can, in OS X, go to the System Preferences and choose the default boot drive, and I've got OS X as my default. But what I want is an option right in the apple drop down menu. Instead of just "restart" and "shut down", I wish there were an additional option: "reboot in [Windows]".

And it would be great if there were yet another way to do the same thing within Windows; again, instead of just "shut down" or "restart", I could choose the drive right then and there.

Is there anything I can do to make this happen? It's not really that much time wasted, but I'd like to be able to not touch the keyboard, sort of a set-it-and-forget-it type of reboot.
posted by zardoz to Computers & Internet (12 answers total) 5 users marked this as a favorite
 
Best answer: You can do this in Windows, right-click the Boot Camp icon (the diamond in the system tray) and select "Restart in Mac OS X".
posted by Mwongozi at 7:00 PM on December 31, 2008


Best answer: BootChamp is a menu item that offers a quick way to reboot in Windows.
posted by nathan_teske at 7:02 PM on December 31, 2008


Best answer: Flipside does the same thing. I've never used it, and can't vouch for it.
posted by waldo at 7:17 PM on December 31, 2008


You can select this under Startup Disk under System Preferences.
posted by dunkadunc at 7:53 PM on December 31, 2008


I haven't tried this myself, but if you have Quicksilver installed, there's apparently an AppleScript solution that you can invoke with a couple of keystrokes:

http://www.macinstruct.com/node/129
posted by socratic at 8:29 PM on December 31, 2008


PS. I suppose you could use it without Quicksilver, but QS makes it an impressively simple task.
posted by socratic at 8:30 PM on December 31, 2008


Following up on the applescript method socratic links to: As is, it asks for your administrator password every time you run it, which is kind of a pain. You can skip this by altering the script thusly:

do shell script "bless -mount /Volumes/[your windows partition]/ -legacy -setBoot -nextonly" password "[your password]" with administrator privileges
do shell script "shutdown -r now" password "[your password]" with administrator privileges

...and then save the script as a run-only application since it's now got your administrator password in it. (Which may or may not actually be secure, but it's a risk I'm willing to take. If I were smarter than I am, or if applescript were less stupid than it is, I'd be able to figure out how to use Keychain Access instead. But I'm not, and it isn't, so I can't.)
posted by ook at 10:36 AM on January 1, 2009


Which, yeah, now that I actually look it up, somebody could theoretically decompile the script to get your password. Which is a Bad Thing. And I figured out how to use keychain after all. So here's a non-stupid way to do it without having to enter your password every time:

* Open Keychain Access (in Applications/Utilities)
* Create a new key (File -> New Password Item). Name it "Switch To Windows" or something equally recognizable. For the account name enter anything you want, since you won't be using that; put your admin password in the password field. Save the item by clicking "add", and quit Keychain Access.
* Now you can use this as the applescript:
tell application "Keychain Scripting"
    set myPass to password of first key of current keychain whose name is "Switch To Windows"
end tell

do shell script "bless -mount /Volumes/[your windows partition]/ -legacy -setBoot -nextonly" password myPass with administrator privileges
do shell script "shutdown -r now" password myPass with administrator privileges
The first time you run it you'll get the standard "such and such application wants to access your keychain"; tell it to always allow that and from then on you're all set.
posted by ook at 10:51 AM on January 1, 2009


Orrrrrr if you just leave out the "password" clause of the "do shell script" command it will prompt you for your password and remember it in your keychain automatically, without you having to do anything. (It might still prompt you for permission to execute the command; I can't remember at the moment.)
posted by kindall at 1:40 PM on January 1, 2009


Did you try it? In my case it didn't remember my password; just asked for it again every time. Perhaps this varies by OS version (I'm on 10.5.6), I really don't know for sure.

I'm not 100% certain, but I think Keychain doesn't automatically track passwords for all applications; only those that explicitly ask for it. I'm no expert, there's probably a better way, YMMV, this is just what worked for me.
posted by ook at 1:53 PM on January 1, 2009


Yeah, I could have sworn that it used to work like that, but no more.
posted by kindall at 8:51 PM on January 1, 2009


Just in case anyone is still following this, or finds it in search: I've been mucking around some more, and found a way to store the password without you having to muck around in Keychain Access manually. So ignore what I said above, it's more work than it needs to be.

Rather than make you read ugly double-spaced code on this page, I'll just link: source code here, or download an already-compiled application here.
posted by ook at 3:45 PM on January 7, 2009


« Older foodies of the world, unite!   |   0.1 gram scale Newer »
This thread is closed to new comments.