Open Source Project –

TomAugust 10, 2012

It started with a tweet:


Now, if you know your tech, you don’t ignore a Tweet from either of the Scotts – Hanselman or Gu.

Even if you don’t do tech, I think you’d still enjoy much of Scott’s output. For instance, try this talk on managing Information Overload – applicable to anyone living in the 21st century.

It turns out that Scott was talking about this blog post, where he uses Lync to create an auto-answering Kiosk app. He’d created a decent solution using the standard SDK, but ran into some problems where he needed to ensure something had the focus, or something else was full-screen, and it was all a bit problematic.

Now, without getting all technical, you can run Lync in something called UISuppressionMode. It, uh, suppresses the UI and gives you complete control. However, it also takes away all the easy-ness. As Scott says:

I’m pretty frustrated as while this is SUPER powerful, it’s also SUPER complex for basic scenarios in my opinion. I think there’s an opportunity here for a small layer on top of Lync that handles the 80% cases…

Well, we’d recently been throwing around the idea of a remote kiosk app ourselves, for easier communication between the satellite development hub of Norwich and the mothership that is St. Albans. So, we thought we’d be ideal for the job.


LyncAutoAnswer- Suppression Mode ON

This is nic_r blowing her own trumpet. Not us.

We got our heads together and got coding. Scott is right, this stuff isn’t trivial, but, not to blow our own trumpets too much, it’s what we do for a living. We like to think we’re OK at it.

Fitting it all in around a tight project we were already doing for Microsoft was a bit of an issue, but after about a month we had something to show. We wrote the layer that Scott had been looking for. We made it super-simple to add to any WPF project and get auto-answering working in UI Suppression Mode. And we did it all Open Source, Free as in Beer, For Anyone To Use. We think that’s pretty cool, and we had good fun doing it as well.

If you’re interested, if you’re techy, if you’re into Microsoft Lync then you should definately check out the project page at:


What’s in the Box?

There’s two parts to the solution. The first is a wrapper. We’ve wrapped up the complexities involved in hosting a video conversation into a WPF control and a simple singeton model.

You can add the control to your XAML and choose which video direction you’d like:

 <modalitycontrol:VideoWindow Direction="Incoming"/>

In this example the direction is Incoming – but if I wanted another version of the control showing my own video feed (commonly placed in the bottom right) I could drop in another instance of the control and set the direction to Outgoing.

The singleton class wraps the functionality of signing into Lync and getting user information such as Display Name, Photo, Availability and Personal Note. We might add extra user information in the future, but for now that seems pretty good.

You can download just the wrapper and integrate it into your own projects by visiting the GitHub project page.


The second part is a simple app to use the wrapper and show off what it can do. Scott had already written a kiosk application, but using functionality in the SDK that requires Lync to be running. We forked the code and created another edition of the software, built using our wrapper.

Our app runs full screen, and is designed to go onto a remote computer, such as a HanselPortal. It’s designed to be the virtual embodiment of a single person. Therefore, when not in a call it’ll show the presence of that person:


When someone places a call to the application, it’ll auto-answer and immediately begin video sharing. The scenario is that I’m at home and want to talk to someone in the office. By calling the application I’ll be immediately patched though.

In this example, I have a deep and meaningful conversation with SackBoy from the comfort of my house. Here’s what is shown on the kiosk (what SackBoy sees):

Yes, my house looks like an office and has co-workers. What of it?

For completeness, this is what I see:

(David Bennet is our test user, stolen here by SackBoy)

You can get this app and try all this for yourself by visiting the LyncAutoAnswer project page. There you can download either the UI Suppressed edition or Scott’s original Not UI Suppressed edition.


Open Source

I think it’s really cool that we’ve contributed something genuinely useful to the community. There are lots of people out there wanting to write auto-answer kiosks. If we can give them a head start to making something awesome, that’s great. The guys we’re targeting with this code are a completely different set of people to those that we normally do business with, so hopefully we’ll set up some new and interesting conversations with different people. It was great fun to work with Scott on something a bit different, knowing that we were putting something back.



I don’t want this to sound like a shill post but I think it’s important to recognise something here:

We went to our bosses and said “Hey, um, there’s this guy called Scott and he works for Microsoft and he’s kinda a big deal and he’s looking for free work but we want to do it because it’d be good for us and it’d be good to put something back into the community”.

I can imagine a lot of bosses not understanding quite what was happening and defaulting to the standard “No.” response. That’s certainly always been the response I’ve had to requests of a similar nature, and it’s frustrating because you know they don’t really understand what you’re saying.

Their response (straightaway) was: “OK, well I’ve no idea who you’re talking about but you clearly rate the guy, and a couple of the Infrastructure guys here have heard of him and rate him, so yes – great idea. We trust you to respect our codebase and our IP, we trust you to make the right calls, and we hope it results in some good Karma at our end”.

Honestly, that was the rough gist of their response. There’s clearly some important lines in the sand here about our own codebase and what competitive advantage looks like, but I’m really impressed that they realised we were the right people to make that decision and let us run with it.

Here’s to the first of our Open Source contributions!

Tagged with:

Comments (11)

  1. Pingback: Introducing - An open source remote worker's Auto Answer Kiosk with Lync 2010 - Scott Hanselman

  2. Well done! Giving back to the community really reflects positively on the company. And, as this is the first time I’ve heard about Modality, I’ve got a *very* positive image of your company.

  3. Good stuff. Is UI suppression, or auto-answer available on WinRT, or better yet Android client? That would appear to be a really cheap path to a simple All In One video kiosk… Thx!

    • Not really, not easily anyway.

      Look out for UCWA when it comes though: that will (one day!) become a game-changer for non-Windows based devices. In its first release it’ll only be IM and Presence, but once AV and App Sharing is added, it’ll be powerful. It’s a REST-ful based solution and basically device and platform-agnostic so will work anywhere you can get an HTTP stream.

  4. This is exactly what we want to do, …but using Lync 2013. I’m surprised nobody out here talking about it. I have the code upgraded to build against Lync 2013 SDK, but getting an exception at startup saying the UI is not running in full suppression mode. Seems like the environment is a bit different in 2013. If Lync is not running, I get an error that the host process is not running. If it IS running, I get the error about not being in UI suppression. Setting the registry keys (even writing to the updated “office15″ hive location for 2013) doesnt seem to have an effect. Only hope left is I see in the SDK docs that you have to uninstall / reinstall Lync 2013 in full ui suppression mode. Any thoughts Tom? Have you gotten any of this to work against 2013 SDK? Thanks!

    • Hi Dan – I don’t think there’s a good reason why the code shouldn’t run in 2013. I know we haven’t updated the code (there’s just not enough hours in the day!!) but I think we’ve had in running against 2013. The client shouldn’t be running though, so make sure there aren’t any stray lync.exe processes running. The registry keys are different (but it sounds like you know that already), check ([HKEY_CURRENT_USER]\Software\Microsoft\Office\15.0\Lync\UISuppressionMode).

      Actually one thing I’ve thought of – you’ll have to rebuild our Lync-UISuppression-VideoAutoAnswer wrapper DLL which the project relies on ( as that uses the Lync SDK as well.

      If you still get problems, can you let me know the full stack trace, and I can take a closer look. I’ll try and run it against 2013 myself as well.


      • Thanks for the quick reply Tom. I ended up getting the UI Suppression working. Reg key is CURRENT USER instead of local machine, and not down in wow6432node even though I’m on 64 bit machine. For anybody following along, this means you don’t start Lync yourself, the first call to GetLyncClient() starts the lync.exe process, but with no UI.

        Anyway – yes, I’ve built a newer version of the wrapper referencing 2013 SDK, and fire up the app, start an inbound video call, it gets accepted, and get an exception when setting LyncVideoWindow.Owner. COM HRESULT 0x800706F7. Some people say that’s unable to write to program files, UAC, or allow unsafe code on the project – all of which I’ve confirmed not to solve the problem.

        I put a screenshot of the exception and stack trace here:

        Any further direction would be greatly appreciated! I agree – it should “just work” against 2013. :)



Leave a Comment

Login to your account

Can't remember your Password ?

Register for this site!