Skip to content

nlscott/ard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARD

Note: This has not been fully tested since macOS 10.15, but was working as of Ventura 13.4.1

A gem to help create and organize commands in Apple Remote Desktop

Installation

Add this line to your application's Gemfile:

gem 'ARD'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ARD

License

The gem is available as open source under the terms of the MIT License.

Usage

This script assumes a couple of things:

  • 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
  • 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

Examples: ..

See this blog post

Print a list of command options:

puts ARD.list_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

Print existing commands and folders:

puts ARD.list_folders

returns any existing single commands or folders in ARD


Create a new empty folder

argument is ("new_folder_name")

ARD.create_empty_folder("folder1")

Get the physical location of a folder:

puts ARD.folder_index("folder1")

returns the physical position of folder "folder1" as an integer


Move existing command into folder:

arguments are ("commandname", "folder to move to")

ARD.move_command("Test Command", "Folder 1")

Move position of existing folder:

arguments are (original_position, new_position)

ARD.move_folder(1, 0)

Rename an existing folder:

arguments are (oldname, newname)

ARD.rename_folder("folder1", "folder0")

Rename an existing command:

arguments are (folder_name, orignialcommandname, newcommandname)

ARD.rename_command("folder0", "command2", "command1")

Create a visual space by using ----

arguments is physical location you want to create the spacer

ARD.create_spacer(1)

Rename an existing folder:

arguments are (oldname, newname)

ARD.rename_folder("folder1", "folder0")

Rename a command:

arguments are ("folder_name", "orignialcommandname", "newcommandname")

ARD.rename_command("Admin Commands", "list of users", "all users")

Delete a command:

arguments are ("folder_name", "command_name")

ARD.delete_command("folder2", "command1")

Delete an existing folder

arguments are ("foldername")

ARD.delete_folder("folder2")

About

A ruby gem to help create and organize commands in Apple Remote Desktop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published