Re: changing start up disk
Re: changing start up disk
- Subject: Re: changing start up disk
- From: John Stewart <email@hidden>
- Date: Sat, 11 Oct 2003 04:22:35 -0400
On 10/11/03 at +0100 Llyr Hughes said this
>
Hi,
>
Is it possible to select a different start up disk using a script.
>
>
I can get as far as opening the Startup Disk pane, but I can't seem to
>
select my 'Mac OS Z1-9.2.2 on HD' system folder
>
>
>
tell application "System Preferences"
>
activate
>
end tell
>
tell application "System Events"
>
get properties
>
tell process "System Preferences"
>
click menu item "Startup Disk"
>
select item "Mac OS Z1-9.2.2 on HD"
>
delay 3
>
click button "Change"
>
end tell
>
end tell
>
>
Thanks
Yes it's possible. This script changes the settings and causes a restart.
(* Any line abutting the left margin is wrapped *)
(* Script Start *)
property pswd : null
if pswd is equal to null then
set pswd to text returned of (display dialog "Enter your password"
default answer "")
else
do shell script "/usr/sbin/bless -folder9 /Volumes/OS9/System\\ Folder
-setOF" password pswd with administrator privileges
do shell script "/sbin/reboot" password pswd with administrator
privileges
end if
(* Script End *)
You will need to change the name of the disk drive ("OS9" in
"/Volumes/OS9/System\\ Folder") in the first shell script statement to the name
of your disk drive while making sure it's properly escaped if it has spaces or
other reserved characters.
On it's first run it will capture your admin password, subsequent runs will
cause a restart.
John
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.