Wednesday, December 13, 2017

#1 2002-03-19 12:09:57 pm

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Scripting OS X to restart into OS 9

Can someone help me write a script to tell OS X to restart into OS 9 ? Using the script below, the Startup Disk will change to my OS 9 disk.

Applescript:

tell application "Finder"
do shell script "/usr/sbin/bless -folder9 '/Volumes/mydiskname/System Folder' -setOF" password "mypassword" with administrator privileges
end tell

The next step is to restart the computer. Adding 'restart' before 'end tell' simply results in the script running continously until it times out. How do I get the script to tell OS X to restart the computer ?

Thanks.


One mans trash is another mans treasure


Filed under: Finder

Offline

 

#2 2002-03-21 10:38:42 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Scripting OS X to restart into OS 9

: tell application "Finder"
: do shell script "/usr/sbin/bless -folder9 '/Volumes/mydiskname/System
: Folder' -setOF" password "mypassword" with administrator
: privileges
: end tell

Hi,
You might want to put this into the shell script portion like this:

"reboot 10" (for 10 seconds until reboot) or whatever time duration you want and add in the admin privileges and password requirement. I will be home later and get the exact wording and shell script syntax down.


One mans trash is another mans treasure


Filed under: Finder

Offline

 

#3 2002-03-22 11:41:24 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Scripting OS X to restart into OS 9

Adding 'restart' before 'end tell' will result in the script running continously until it times out. But if I press 'Command-period' to stop the script, all application will quit and the computer restarts. Since Startup Disk has been changed to my OS 9 disk, the computer restarts into OS 9.

How do I 'tidy up' the script to make it work on its own, ie. without having to press 'Command-period' ?

Any help would be appreciated. Thanks.


One mans trash is another mans treasure

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)