Adding Custom Commands to Lync 2010 Menus

Use custom commands embedded in the Microsoft Lync 2010 UI to start applications on the Microsoft Windows desktop.

Custom commands are menu items that are added by the developer to the Lync 2010 UI.

Adding Custom Commands

To add a custom command for an application, add a registry subkey and the registry entries described in this topic.

Registry Subkey

The subkey is the application GUID, added at one of the following locations:

  • For 64-bit operating systems: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Communicator\SessionManager\Apps

  • For 32-bit operating systems: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Communicator\SessionManager\Apps

Registry Entries

Under each GUID subkey, add the entries described in the following table.






Name of the application as it appears in the Lync 2010 UI.



Full path of the application along with parameters, including the default parameters of %user-id% and %contact-id%. The parameters pass a String representing the SIP URI of the user signed in to Lync 2010 and the selected contact or contacts, to the application. By using Path values, a shell execute command may fail because of characters which have special meaning in the shell environment. Be sure to wrap the default parameters in double quotation marks to avoid shell execution failure. The following examples show usage for HTML and .exe paths.

c:\\ext_menu.exe /userId=”%user-id%” /contactId=”%contact-id%”



0 = Executable, 1 = Protocol.



Full path of the executable. Required if ApplicationType is 0.



  • 0 = local session. The application is started on this computer.

  • 1 = two-party session. Microsoft Lync 2010 SDK starts the application locally and prompts the other user to start the application on their computer.

  • 2 = multi-party session. Lync SDK starts the application locally and prompts the other users to start the application on their computers.



A semicolon-delimited list of areas where the command appears. Possible values: MainWindowActions, MainWindowRightClick, ConversationWindowActions, ConversationWindowRightClick, ContactCardMenu.

If ExtensibleMenu is not defined, the default values of MainWindowRightClick and ConversationWindowActions are used.

For example, see the following Registry Editor (.reg) file results.

Windows Registry Editor Version 5.00
"Name"="Contoso Custom Application"
"Path"="C:\\ExtApp1.exe /userId=%user-id% /contactId=%contact-id%"

Custom Parameters for the Path Registry Entry

Custom parameters %param1% through %param7% may be set for each application.

"Name"="Your Application Name "
"Path"="C:\\Program Files (x86)\\YourApplication\\ps.exe %param1%"
"ToolTip"="tooltip text"

These parameters will be replaced by values added in a separate key under HKEY_CURRENT_USER as shown in the following example, and passed to the recipient in the appINVITE message.


Using Custom Commands

The following table describes how to start an application with a given ExtensibleMenu value.

ExtensibleMenu value



In the upper-right corner of the Lync 2010 conversation window, click the Show menu button, point to Tools, and then click the custom command.


In the conversation window, right-click a contact in the Contact List or Search Results pane, and then click the custom command.


In the upper-right corner of the conversation window, click the Show menu button, point to Actions, and then click the custom command.


In the conversation window, click the View more layout options button, select People Options, enable Show Participant List, right-click a contact name, and then click the custom command.


Click the custom command in the contact card Options menu.

Retrieving SIP URIs in the Custom Application

To retrieve the %user-id% and %contact-id% arguments, add code to the application started by the custom command.

static void Main(string[] args)
  if (null == args || args.Length == 0)
    Console.WriteLine("Args is empty");
    foreach (string arg in args)
      Console.WriteLine("Arg: " + arg);

Removing Custom Commands

Removing the GUID subkey removes the appropriate custom commands from the Lync 2010 UI.

See Also

Other Resources

Lync Extensibility API Concepts (Lync 2010 SDK)