I am trying to write a very simple applescript that will let me change the current startup disk. My ultimate goal is to remotely login to a lab computer and select a NetworkInstall image to be automatically booted into. This question seems like it should be simple but I have been unable to find any references to changing boot disks anywhere on the net via applescript.
There are basically two ways of doing this via AppleScript, and neither is a ‘pure’ AppleScript solution.
The first method is to use GUI scripting to emulate opening System Preferences, selecting startup disk, clicking the drive, etc., etc., etc., blah, blah, blah. ( can you tell this isn’t my preferred option? )
The second is to use the shell command ‘bless’ via ‘do shell script’.
You can use:
do shell script "bless -device"
to switch disks, or
do shell script "bless -folder"
to select a different startup/System folder on the current drive. man bless will give you the low-down on the different options.