client config..

Hi All,
Currently I have an automator setup between a few clients and an xserve.
The script runs each morning while the computers start up, connect to the xserve to download any files, set changes, empty trash etc and disconnect from the server… no worries… However I’ve decided its time for an overhaul.

I’ll use automator for the full thing still, but it doesn’t matter if I need to use applescript or whatever in the workflow to get the job done.

My first objective however is to create a new installer for it all… currently an automator script runs and copies content to the machine and sets a few settings. I’d like to change this by when the script is launched, firstly I’d like to ask if its a recovery install or clean install (so basically a box asking which option, then launching the script from there).

Secondly the installer script starts SSH via terminal, but this requests a password with admin rights to be entered - I know this can be done automatically but I can’t remember how… I’d also like to enable the root account at the same time which I know can be done by “sudo passwd root” then the password is requested, how can I enter that in as well - as the “keystroke” command doesn’t work with it.
from there the script will give the computer a name (which I’ve got worked out so that all the computers on the network don’t end up with the same name)

Something else I was interested in doing was displaying a window (either in the center of the screen or a corner) that just displays that the script is running, so something that is launched at the beginning of the automator script, and killed at the end… but how can I produce I window to do that?

Also is it easy enough to do, to disable the screen saver, and turn off the options that put the machine/display asleep?

the script currently does the following (not necessarily in this order):
-Connects to server
-delete itunes library (just to remove any possible illegal music)
-downloads content, i.e iPhoto and iTunes libraries, dock preferences
-mutes volume
-empties the trash
-sets the background picture
-install given applications
-set desktop items
-Set hard drive name
-update itsself
-disconnect from server

What I’m aiming to achieve is for no matter what happens during the day to the systems, the script will run the next time the machine is restarted, and run the script so the machine will at least look the same as all the other clients.

If there is anything else you think might be useful to include I’m all ears! (trying to impress management)

Browser: Firefox 2.0.0.3
Operating System: Mac OS X (10.4)

If you’re familiar with the command line, check out /usr/bin/pmset.

ok cool… now do you know the easiest way to the a script to submit a password?

i.e. for the command
sudo service ssh start

prompts for a password, whats the easiest way to have the script enter this in?