Installation manual

To execute an AppleScript script using the Send UNIX Command:
This method uses the osascript command. For more information, see the osascript
man page.
1 Select a computer list in the Remote Desktop window.
2 Select one or more computers in the selected computer list.
3 Choose Manage > Send UNIX Command.
4 Type or paste the AppleScript script in the UNIX Command window, like this:
osascript -e 'First line of script' -e 'Next line of script' [ -e ... ]
Alternatively, you could use a UNIX “read standard input” redirection which looks like:
osascript <<EndOfMyScript
...insert script here...
EndOfMyScript
For example, a simple script to create a folder and set its label would be entered as:
osascript <<EndOfMyScript
tell the application "Finder"
make new folder
set the name of the result to "New Folder"
set the label index of folder "New Folder" to 2
end tell
EndOfMyScript
5 Click Send.
The client computer executes the script.
Built-in Command-Line Tools
Mac OS X includes powerful command-line tools that can be used with Send UNIX
Command, such as networksetup and systemsetup. The kickstart tool is embedded
within the Apple Remote Desktop client software, and doesn’t interfere with existing
installations of the software on Mac OS X Server.
The locations of two of the tools (networksetup and systemsetup) are added to the
default shell PATH, so you can access them through Remote Desktop as if they were
installed in one of the standard UNIX tool locations.
The kickstart tool isn’t in the default shell path. It must be activated explicitly at its
location:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/
Resources/kickstart
Any command that uses networksetup or systemsetup can be used in Remote
Desktop using the Send UNIX Command task. To change any settings using these
tools, you must run them with root permissions.
15 6 Chapter 8 Administering Client Computers