Pages Menu
TwitterRssFacebook

Posted by on Aug 11, 2014 in Skype for Business® (Lync®)

The 6 things you need to know about UI Suppression Mode

The 6 things you need to know about UI Suppression Mode

You’ve heard of UI Suppression in relation to Lync Desktop Development, but what does it really mean, and what can it do? Here are the 6 things you need to know.

1. What is it?

Normally, when using the Lync Client SDK to write desktop applications with Lync functionality, the Lync client is running. It’s a requirement of the SDK that the Lync client is installed, and when you call certain functions in the SDK, for example making a call or starting a new instance message conversation, you can see that happening in the Lync client. The best way to think about it is that the SDK is automating the client for you or your user.

However, sometimes you don’t want to reuse the client: you want to handle everything yourself. For instance, if you’re writing an application for a touch-screen kiosk to go in a reception area, you don’t want users to see the Lync client: you want to provide your own UI to handle all the things the kiosk might do. In fact, showing the Lync client may allow the kiosk user to do things you don’t want them to, like change devices or settings.

This is where UI Suppression comes in. It’s designed so that the Lync SDK can still use the client for Lync functionality, but it’s not displayed to the user. When it’s enabled the lync.exe process will still run, but you won’t see the Lync splash screen, or the client displayed.

2. How to turn it on (and off)

Turning UI Suppression on and off is only possible via the registry.

To turn UI Suppression on, open regedit and navigate to HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\15.0\\Lync

(if you don’t already have it)Create a new DWORD called UISuppressionMode and set the value to 1.

Exit Lync.

From your code, calling LyncClient.GetClient() will cause the lync.exe process to start and you can interact with Lync from your code.

To turn UI Suppression off, either delete the registry key above, or set the DWORD value to 0. Depending on how cleanly your application exited (and whether or not you shut Lync down in code) you may need to terminate the lync.exe process before double-clicking the Lync icon to open Lync normally.

You can also set Lync to install with UI Suppression turned on by default, by calling the installer with the switch /FullUisuppression

For Lync 2010 the key is still called UISuppressionMode but the registry location is either:
32 bit: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Communicator
64 bit: HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Communicator

3. The advantages of UI Suppression

  • Applications created for UI Suppression mode can offer a more customised user experience, incorporating corporate branding or be designed for specialist demographics, such as children or old people.
  • You can hide login credentials within your application so that you don’t have to expose them to users of the application. For instance, for a kiosk application you might create a KioskUser1 user, but embed the credentials into the application. On startup, the application can then perform the Lync login process without needing any interaction from the user.
  • You can control which Lync features are available. For instance, you might want to limit features to only instant messaging. Because you are in complete control of the UI, the only features which are available to your users are the ones you provide code for.

4. The disadvantages of UI Suppression

  • With great power comes great responsibility! With UI Suppression, you’re responsible for handling all the user interactions. For instance, if users need to log in as themselves, you’ll need to provide a login screen to capture Lync address and password. If Autodiscovery doesn’t work, you’ll need to re-prompt for domain credentials etc etc. This can lead to lots of extra code, more testing etc.
  • If users will be signing in as themselves, then you will be created a Lync endpoint for that user. That means that their presence will be shown to other users, and any calls or messages sent to that user will be forwarded to your device. You need to deal with them (either presenting them to the user to accept/decline) or declining them outright. The normal Lync incoming popup won’t be shown.
  • If you want your users to be able to change devices, you have to provide a mechanism for them to do this in your application. The SDK has methods to list and change devices, but it’s important to remember that your users won’t have access to the usual Tools > Options dialog box. Read more about changing devices here: Lync: Programmatically switching video device during a call

5. Kiosk setup tricks

If you’re creating a kiosk-style application which always logs in as the same user, and always uses the same devices, then this trick might work for you, and save you writing extra code:

On the kiosk device, turn off UI Suppression and load up the Lync client. Sign in as the user you will be using. This gives you a chance to provide domain credentials, tests that the user is active and caches the credential certificates on the machine. Once you’re logged in, use the Lync client to set up the default devices exactly how you want them for the kiosk experience.

Once you’re done, exit the Lync client, and turn UI Suppression on. Your application will now be able to log on simply by passing SIP address and password, and won’t have to worry about checking or changing devices.

LyncAutoAnswer.com - Open Source UI Suppression Mode Project

LyncAutoAnswer.com – Open Source UI Suppression Mode Project

6. Use GitHub code to get started

A while ago, I helped contribute to a project called LyncAutoAnswer with Scott Hanselman and Paul Nearney which is a full-screen UI Suppressed WPF application which auto-answers incoming calls and makes them video calls automatically. All the code is open source, so you can download and look through how it’s all done. In particular, the UI Suppression part is also its own project: Lync-UISuppression-VideoAutoAnswer and is a good place to go if you just want to browse through the code.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

1 Comment

  1. Hi
    I have a question about Lync.ui suppression. I want to be shown Lync users as offline during communication process. is it possible to set the users appear offline in Lync suppression mode?

Trackbacks/Pingbacks

  1. The 6 things you need to know about Microsoft Lync UI Suppression Mode | thoughtstuff | Tom Morgan | JC's Blog-O-Gibberish - […] http://blog.thoughtstuff.co.uk/2014/08/the-6-things-you-need-to-know-about-ui-suppression-mode/ […]
  2. SkypeDevQ: UI Suppression in Skype for Business client | The thoughtstuff Blog - […] last time I wrote anything signification about UI Suppression was in August 2014 in my blog post The 6 things…
  3. With Teams Interop for Azure Communication Services, developers can finally create native Web and Mobile experiences | The thoughtstuff Blog - […] will remember the Skype for Business Client SDK and the ability to run in UI-suppressed mode (that I was…

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.