Reboot Into BootCamp – Script, AppleScript, App 10TutorialHeyI use Windows semi-regularly to play PC games, when booting into Windows with Boot Camp, I normally have to restart as normal, wait for the main screen to pop up, press Option, restart my Mac again because I forgot to press option, select my Windows hard drive and boot up as normal. This takes far too long and in the boot time I would rather get a drink than wait to select the correct drive. So I went on a quest last night to find a simple one click solution to reboot, automatically into Windows. I wanted a solution where I click an icon and my Mac restarts, avoiding an option to enter my password. As you will find out this is a lot harder than you would think. There is three solutions that do work each with varying results. These are a Terminal command /script. An AppleScript and an Application someone has designed.Terminal ScriptWhen doing anything like this I automatically turn to a Terminal script. Most of the time there is a solution. There is actually a solution which does work, however I deem it to be a bit “violent” as it kills everything immediately and then restarts. This is OK, however any unsaved files will not prompt the save dialogue box. The script itself is as follows.
/usr/sbin/bless –device /dev/disk0s3 –setBoot –legacy –nextonly | sudo shutdown -r nowThe thing to note is that /dev/disk0s3 is the Boot Camp disk. You can find out which disk it is in Disk Utility, you may need to change disk0s3 if you have more than one partition or drive.The previous script did work, a warning does come up every so often in Terminal. Due to the way your Mac system is built you cannot skip the add password bit. This includes setting the script as root user. I could get round this by adding my password into the script as a variable but this would open a security hole that I didn’t want.As a result the Terminal script did what I want, however it was a little bit violent, as mentioned, and I would need to add my password, so I turned to AppleScript.