Alright. I’m really new to this scripting thing and stuff. And I understand that you can have scripts run when you logon to a computer.
An example that I have in my mind right now is, over the summer while I was taking a class in this computer lab at a university, they had a lab running all Windows 2000 Professional. Everytime you logged on, it would run a script which essentially “restored” the computer back to a state that they had defined before? So EVERYTHING in the computer would be the same as they had intended/set it up to be, everytime you logged on, with the exception of a “Work” folder which is left untouch. But otherwise, preferences, folders, you know, everything is identical.
I understand the reason you would use that script is to keep crashes to a bare minimum, and keep complete uniformity. I think the script is GREAT actually, since if you just work out of one folder, then basically the rest of your computer is “new” and “formatted” when you login.
SOOOOOO…
Is this possible in Mac? Preferably in OS 9.x? An AppleScript that will maybe… “Restore” a user defined “image” or something? I dunno, give me your thoughts on this please?
Just as a background, I don’t really use a Mac at home, though at school, I work with a bunch of Mac’s, and basically our yearbook organization has 3 iMacs, G3’s, with OS 9.2, I’m pretty sure. Also an older G3 desktop and an older older beige G3 desktop, aside. But mainly these three iMacs are the focus of my concern, since they CRASH a lot, I think a script like this would benefit a lot.
Sorry for all the rambling, but thanks for reading if you got this far! :lol:
Firstly, since you’re working OS 9, you’re going to want to put your script in the “Startup Items” folder. (Which is in the “System Folder”) Since OS 9 doesn’t exactly have a ‘logon/login’, this would equate to what you’re looking for.
Next, it would be pretty easy to do things like round up all the items from the desktop which may have been saved or spread around by a user. This would be a natural part of your housecleaning. Same goes for positioning of items on the desktop.
Theoretically, you could also do the same for the Control Panels and Extensions folders, if you invested some time in knowing what’s supposed to be in those folders and what isn’t. Easy enough to move that stuff around via a script.
Preferences might be a tougher, but not insurmountable issue. If all the apps you’re running on these machines are amicable to accepting dropped-in preference files, then you can just round up ‘clean’ copies of these and hide them in a “restore_folder” of some kind in, say, your Utilities folder. Then, in the script, copy them to their respective locations with replacing.
Post with further details or your code if you’d like help with the nitty-gritty of it all.
Thanks… Well. Hehe, did I mention that I’m a total newbie to this AppleScript thing? Would you have any places I should go to to start myself off? Dunno. Thanks, sorry to be a nuisance.
Well, your situation is an excellent candidate for Finder recording.
Fire up your Script Editor, hit “Record” and move stuff around where you want it. Then, hit “Stop”. You’ll see AppleScript code generated right before your eyes.
When you have something that resembles usable, post it here and we’ll help you clean it up and give you lots of great pointers.
Ack. Sorry. Here goes my tweaking of what I want again… Well, say I did record moving stuff to where they belong… Everytime someone uses the computer, it’s going to end up looking differently… So I can’t, “restore” the original state… Is there a way like on a PC, take an “image” of the drive or something, and have it restore on login? I know that’s how the Clean Install CDs that come with the Mac work, they are just factory images… I dunno, rambling, TJ seems to be helping a lot, thanks TJ.
Sure, you can do restores from a disk image, but that takes quite a bit of time. I can’t imagine anyone wishing to do this as often as one reboots or just between user sessions. Seems like overkill to me.
Plus, a ‘work folder’, as you spoke of, would be eliminated in a true disk image restore. Therefore deleting all work that was done and saved to that folder in the previous session.
Ack. :?:
Bah, yeah, I just realized that problem too… Hmm… Is copying the System Folder bad? Hmm. What if, I had a “copy” of each folder that’s important, and that would change on day to day use… And on startup, it would copy that one to the original? I dunno… Haha. Still thinking out my options.