146 Chapter 8 Administering Client Computers
To copy and execute a script:
1Prepare and save your script.
Make sure your script is saved as plain text with UNIX line breaks.
2Open Remote Desktop.
3Select a computer list in the Remote Desktop window.
4Select one or more computers in the selected computer list.
5Use the Copy Items command to copy your script to the client computers.
See “Copy Options” on page 107 and “Copying from Administrator to Clients” on
page 108 for more information.
6After copying the script, choose Manage > Send UNIX Command.
7Execute the script by typing:
sh script pathname
8Click Send.
Executing AppleScripts with Remote Desktop
AppleScripts can be executed on client computers in two ways. They can be saved and
executed as an application, or sent at once using the command line.
To learn more about AppleScript, see AppleScript Help in Help Viewer or go to:
www.apple.com/applescript/.
To send and execute an AppleScript:
1Save the AppleScript as an application.
2Open Remote Desktop.
3Select a computer list in the Remote Desktop window.
4Select one or more computers in the selected computer list.
5Use the Copy Items command with the Open Items option selected in the Copy Items
dialog.
See “Copy Options” on page 107 for more information.
To execute an AppleScript using the Send UNIX Command:
This method uses the osascript command. See the osascript man page for more
information.
1Select a computer list in the Remote Desktop window.
2Select one or more computers in the selected computer list.
3Choose Manage > Send UNIX Command.
4Type or paste the AppleScript in the UNIX Command window, like this:
osascript -e 'First line of script' -e 'Next line of script' [ -e ... ]