- you have Apple Remote Installed on the local machine
- you run this script in the user account that uses Apple Remote Desktop
- for clarity and to avoid name collisions, all folders and commands you create should have unique names otherwise you can receive errors when trying to delete or move folders or commands
- don't change anything in ARDplist.rb unless you know what you're doing
- it assumes you already have a file at ~/Library/Containers/com.apple.RemoteDesktop/Data/Library/Application Support/Remote Desktop/Presets/UnixCommandTask.plist, if you don’t open Apple Remote Desktop, click on “Unix” and save anything as your first command .. this auto generates the UnixCommandTask.plist file
- Make sure your script to execute the commands and the ARDplist.rb are in the same directory
- Make sure at the top of your file you type: require './ARDplist' ... see ARDplist_usage for examples
You must require 'ARDplist.rb' in your script before calling it.
After you require ARDplist.rb in your ruby file, you can run the command below to see all your options.
puts ARD.options
This will return:
- create_command
- create_folder
- create_spacer
- delete_command
- delete_folder
- folder_index
- list_folders
- move_command
- move_folder
- options
- rename_command
- rename_folder
See this blog post
puts.ARD.list_folders
returns any existing single commands or folders in ARD
argument is ("new_folder_name")
ARD.create_empty_folder("folder1")
puts ARD.folder_index("folder1")
returns the physical position of folder "folder1" as an integer
arguments are ("commandname", "folder to move to")
ARD.move_command("Test Command", "Folder 1")
arguments are (original_position, new_position)
ARD.move_folder(1, 0)
arguments are (oldname, newname)
ARD.rename_folder("folder1", "folder0")
arguments are (folder_name, orignialcommandname, newcommandname)
ARD.rename_command("folder0", "command2", "command1")
arguments is physical location you want to create the spacer
ARD.create_spacer(1)
arguments are (oldname, newname)
ARD.rename_folder("folder1", "folder0")
arguments are ("folder_name", "orignialcommandname", "newcommandname")
ARD.rename_command("Admin Commands", "list of users", "all users")
arguments are ("folder_name", "command_name")
ARD.delete_command("folder2", "command1")
arguments are ("foldername")
ARD.delete_folder("folder2")