[X] [AppleScript] Need help - Apple (2024)


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

[X] [AppleScript] Need help - Apple (2)

File Quit

Premium Member

2004-May-8 9:35 pm

[X] [AppleScript] Need help

Hey,
Sadly, some of our older applications do not play nicely with Classic in X. So instead of us, the admins, having to log out of the student account(which sometimes goes into a blue screen to black and white Darwin prompt), log into the admin account, and change the startup disk, is there an AppleScript we can make for the student account to have the ability to restart in OS 9? Thanks!!!

· actions · 2004-May-8 9:35 pm ·


Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

[X] [AppleScript] Need help - Apple (4)

Johnny34

Premium Member

2004-May-8 10:04 pm

said by File Quit:Hey,
Sadly, some of our older applications do not play nicely with Classic in X. So instead of us, the admins, having to log out of the student account(which sometimes goes into a blue screen to black and white Darwin prompt), log into the admin account, and change the startup disk, is there an AppleScript we can make for the student account to have the ability to restart in OS 9? Thanks!!!

Seems impossible without using a shell script, but I posted over at Macscripter.net in the Applescript-OS X forum to see if they can help out. There is also the issue with storing the admin password in the script.....

· actions · 2004-May-8 10:04 pm ·


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

1 edit

[X] [AppleScript] Need help - Apple (6)

File Quit

Premium Member

2004-May-8 10:07 pm

we would have the script hidden, and none of the students (besides me, and i know the password) would have any knowledge of looking at the script. it would be hidden anyway.

edit- i reread your post and saw it can be taken two ways, if the top isnt true , just ignore it [X] [AppleScript] Need help - Apple (7).

· actions · 2004-May-8 10:07 pm ·


JJ
Beat It, Bill
MVM
join:2000-02-18
Madison, WI

[X] [AppleScript] Need help - Apple (9)

JJ to Johnny34

MVM

2004-May-8 10:13 pm

to Johnny34
said by Johnny34:Seems impossible without using a shell script, but I posted over at Macscripter.net in the Applescript-OS X forum to see if they can help out.

'bless' would get the job done in a shell script embedded in an Applescript, but each script might need to be machine-specific depending how the volumes are named, unless it's to be a fairly complex script.

· actions · 2004-May-8 10:13 pm ·


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

1 edit

[X] [AppleScript] Need help - Apple (11)

File Quit

Premium Member

2004-May-8 10:15 pm

The volumes are named based on computer lab, but to make things simpler, our image we are making for summer will have one volume name for ALL of the machines so this may not be an issue. I also tried an OF hack but it was very tricky to get to work, and it only worked on 1 machine when I did apply it.
edit - typos

· actions · 2004-May-8 10:15 pm ·


Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

[X] [AppleScript] Need help - Apple (13)

Johnny34

Premium Member

2004-May-8 10:44 pm

I was assuming that each machine had an OS 9 volume, correct?

Try a little script like this to see what happens:

do shell script "sudo bless (whatever the parameters are)"
ignoring application responses
tell app "System Events" to restart
end ignoring

· actions · 2004-May-8 10:44 pm ·


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

2 edits

[X] [AppleScript] Need help - Apple (15)

File Quit

Premium Member

2004-May-8 10:47 pm

how can i figure out the parameters, im a unix n00b

edit-
from bombiich.com

would this work?

bless -folder9 /Volumes/diskname/'System Folder' -label "diskname" -bootBlocks

replacing with the diskname etc etc.

· actions · 2004-May-8 10:47 pm ·


Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

[X] [AppleScript] Need help - Apple (17)

Johnny34

Premium Member

2004-May-8 10:58 pm

I don't know how to use the bless command - we shall have to ask JJ. Another question I had was how to do a sudo programatically - it's going to ask for the password unless you use "passwd" to tell it to get passwords from a file, which you can make secure.

Also, we can make the AppleScript a run-only, which means it forever can't be opened in the Script Editor (which really just decompiles the bytecode). But the students could try using a text editor to find the password in the AS file. You said it would be hidden - you can make it execute-only and not readable or writable?

· actions · 2004-May-8 10:58 pm ·


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

1 edit

[X] [AppleScript] Need help - Apple (19)

File Quit

Premium Member

2004-May-8 11:02 pm

meaning by hidden, it would be in a hard to find folder, and i would make the applescript executable, and i have the script text on my machine only if i need to edit it.

· actions · 2004-May-8 11:02 pm ·

File Quit

[X] [AppleScript] Need help - Apple (20)

File Quit to Johnny34

Premium Member

2004-May-8 11:04 pm

to Johnny34

oh and by the way i know nothing about unix, unix scripts, and very little about apple scripts. i am trying to figure it all out, so i will ask stupid questions and need lots of guidance. hopefully i can get a greater understanding out of all of it.

· actions · 2004-May-8 11:04 pm ·


JJ
Beat It, Bill
MVM
join:2000-02-18
Madison, WI

[X] [AppleScript] Need help - Apple (22)

JJ to File Quit

MVM

2004-May-8 11:13 pm

to File Quit

The syntax for 'bless' would look like this:

sudo bless -folder9 <path to OS9 folder goes here> -setOF

· actions · 2004-May-8 11:13 pm ·


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

[X] [AppleScript] Need help - Apple (24)

File Quit

Premium Member

2004-May-8 11:18 pm

k, and johnny, how can i make this into a unix script to make it restart after. i now understand the bless command fully, thanks JJ!

· actions · 2004-May-8 11:18 pm ·


Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

[X] [AppleScript] Need help - Apple (26)

Johnny34 to JJ

Premium Member

2004-May-9 1:10 am

to JJ
said by JJ:The syntax for 'bless' would look like this:
sudo bless -folder9 <path to OS9 folder goes here> -setOF

How does he get past the password that sudo is going to ask for?

· actions · 2004-May-9 1:10 am ·

Johnny34

[X] [AppleScript] Need help - Apple (27)

Johnny34 to File Quit

Premium Member

2004-May-9 1:13 am

to File Quit
said by File Quit:k, and johnny, how can i make this into a unix script to make it restart after. i now understand the bless command fully, thanks JJ!

Just use the Applescript I showed above. It first tells AppleScript to run JJ's unix script to do the blessing; then it tells the app "System Events" to restart the machine, ignoring all "close file" and so forth messages. If you want those messages to appear, take out the "ignoring and end ignoring" statements. Of course, if after the restart command is given by the script, then if the restart is interrupted by a dialog box, can the students choose "restart" manually?

· actions · 2004-May-9 1:13 am ·


JJ
Beat It, Bill
MVM
join:2000-02-18
Madison, WI

[X] [AppleScript] Need help - Apple (29)

JJ to Johnny34

MVM

2004-May-9 9:19 am

to Johnny34

I guess we'll leave out the 'sudo' part of the commmand and use the 'setuid' trick to get the script to run as root. Naughty but effective.

· actions · 2004-May-9 9:19 am ·


Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

[X] [AppleScript] Need help - Apple (32)

Johnny34

Premium Member

2004-May-9 10:52 am

Heh - after this is done, I'd hate to be the new guy who had to figure it out and change it.

· actions · 2004-May-9 10:52 am ·


File Quit
Mac Geek
Premium Member
join:2002-11-28
Richmond, TX

1 edit

[X] [AppleScript] Need help - Apple (34)

File Quit to JJ

Premium Member

2004-May-10 6:04 pm

to JJ

and how does this setuid thing work?
do i have to have the root password in the script? we have enabled a password for it

· actions · 2004-May-10 6:04 pm ·


JJ
Beat It, Bill
MVM
join:2000-02-18
Madison, WI

[X] [AppleScript] Need help - Apple (36)

JJ

MVM

2004-May-10 6:18 pm

Create the script, e.g.

#!/bin/sh
bless -folder9 <path to OS9 folder goes here> -setOF

(note there's <b>no</b> 'sudo')

then download X-Ray and use it to: make the script executable by owner, group, and world; set the owner to root (use 'wheel' for the group); and set the 'setuid' bit. What you will have is a script that can be executed by anyone (including the Applescript) and does not require a password.

· actions · 2004-May-10 6:18 pm ·

[X] [AppleScript] Need help - Apple (2024)
Top Articles
'Resurrected from the dead': Harris pick of Walz caps complete shake-up of 2024 race
Analysis: Walz could help Harris shore up the ‘blue wall’ on the way to the White House | CNN Politics
Consignment Shops Milford Ct
Tears Of The Fallen Moon Bdo
Busted Newspaper Birmingham Al
Who is on the FBI Most Wanted list cryptocurrency?
Mark Johnson Weather Salary
Osage actor talks Scorsese, 'Big Uncle Energy' and 'Killers of the Flower Moon'
Milk And Mocha Bear Gifs
Uhsbhlearn.com
Gt7 Roadster Shop Rampage Engine Swap
American Airlines Companion Certificate Blackout Dates 2023
35Mmx45Mm In Inches
Car Complaints Toyota
Dmv Rocklin Wait Times
11 Shows Your Mom Loved That You Should Probably Revisit
Battlenet We Couldn't Verify Your Account With That Information
Watch The Most Popular Video Of Mikayla Campinos Online
Syracuse Deadline
What Happened To Zion Judah Satterfield
'Blue Beetle': Release Date, Trailer, Cast, and Everything We Know So Far About the DCU Film
Blue Beetle Showtimes Near Regal Independence Plaza & Rpx
Birkenstock Footprints Lawrence Ks
Walmart Careers Stocker
Wdl Nursing Abbreviation
Www.publicsurplus.com Motor Pool
Fto Kewanee
Funny Marco Birth Chart
Between Friends Comic Strip Today
Publix Super Market At Lockwood Commons
Ms Eppi Login
Kltv Com Big Red Box
Fototour verlassener Fliegerhorst Schönwald [Lost Place Brandenburg]
Phun.celeb
9294027542
Jan Markell Net Worth
Honeywell V8043E1012 Wiring Diagram
Get Over It Stables
Kcu Sdn
Www.manhunt.cim
How to Watch Age-Restricted YouTube Videos Without Signing In
Entegra Forum
Hannaford Weekly Flyer Manchester Nh
Naviance Hpisd
Aces Fmc Charting
Minute Clinic Schedule 360
Ekaterina Lisina Wiki
Gasmonkeygarage.com Cars For Sale
Used Cars For Sale in Pretoria | Quality Pre-Owned Cars | Citton Cars
Select Costco Stores: Insta360 X3 5.7K 360° Action Camera Adventure Bundle $100 (In-Store Purchase Only)
Love & Basketball streaming: where to watch online?
Nfl Espn Expert Picks 2023
Latest Posts
Article information

Author: Nathanael Baumbach

Last Updated:

Views: 6492

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Nathanael Baumbach

Birthday: 1998-12-02

Address: Apt. 829 751 Glover View, West Orlando, IN 22436

Phone: +901025288581

Job: Internal IT Coordinator

Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.