Command line

Apple’s Installer command line tool can install Microsoft Lync for Mac 2011 because it is delivered by Microsoft in Apple’s Package format. Command line installation is ideal for distribution of software to multiple computers because it can be done across the network from a central location. Shell scripts can call the Installer as part of a larger set of scripted commands making this one of the most versatile methods of delivering software.

Basic command line installation

The basic command contains two parts. The first part is the path to the package to be installed and the second part is the path to the target volume. Assuming the Lync Installer.mpkg file has been copied to the /private/tmp folder of a computer and that the system is also the target volume, the basic command is:

Because Lync for Mac is installed into the /Applications folder the Lync Installer.mpkg file must be installed by an administrator. He can invoke root privileges using the sudo command if needed.

Choices file

By default, all components of Microsoft Lync for Mac are installed whether double-clicking the Lync Installer.mpkg file or installing it from the command line. To selectively install components during a command line installation requires a choices file. This file is deployed with the installer and called as part of the command line instructions.

To view a list of choices available in the Lync Installer.mpkg file, the command is (one line):

Each choiceIdentifier matches one of the choices in the GUI installer.

Lync choices

GUI Installer choices

Lync Terminal choices

Command Line choices

Creating the Choices file is as simple as including the desired choiceIdentifiers in an array in an XML file. To start the file, use any text editor such as TextEdit to create a new file called mychoices.xml.

Including a choiceIdentifier in the mychoices.xml file is the equivalent of selecting or deselecting the choice in the GUI. Remember, everything is selected by default to be installed. To deselect an item add its choiceIdentifier to the Choices file. For example, to install everything except Dock Icons, add the dock choiceIdentifier to the mychoices.xml file:

Verifying the Choices file

To verify the correct choices will be installed, use this command (one line):

Applying the Choices file

Copying the Lync Installer.mpkg file and the mychoices.xml file to the /tmp directory of the remote computer where the software will be installed ensures that they will be automatically deleted when that computer is restarted. Files can be copied using Apple Remote Desktop, the command line SCP tool or using any administrative tools available.

Once both files are located in the /tmp directory then run this command (one line):

More information

To learn more about the command line Installer, open the application found in /Applications/Utilities and enter:

To learn more about making a Choices file, read Creating an Installer Choice Changes XML file for Leopard by Patrick Fergus on

Share this:
  • Twitter
  • Facebook
  • Digg
  • StumbleUpon
  • Google Bookmarks
  • PDF
  • Print