Microsoft’s Skype for Business (formerly named Lync and Communicator before that) is a great collaboration tool but unfortunately it doesn’t support using multiple accounts (concurrently).

Launching a 2nd instance just activates the already running instance, and brings the main Window to the foreground. The behaviour is very similar to Google Earth on Citrix XenApp which I covered in a previous blog.

This is very inconvenient if you have more than one account, e.g. if you’re an external consultant you likely have an account within your own organization and one in the customer’s organization.

In my case, I have a work (Cloudhouse) account and an account for the Dutch Citrix User Group (DuCUG), as I am a member of the steering group.

I don’t believe Microsoft is deliberately blocking running multiple instances, it just hasn’t accounted for it.

The way developers detect if an application is already running is to use synchronization objects, typically this is a Mutex. To see which objects Skype for Business is using we can use API Monitor:

API Monitor is a free software that lets you monitor and control API calls made by applications and services. Its a powerful tool for seeing how applications and services work or for tracking down problems that you have in your own applications.a

Once you’ve started API Monitor you can select which API calls you’d like to monitor. Since we are interested in sychronization objectes I have selected Event and Mutex from System Services -> Synchronization:

Now we can launch Skype for Business via File | Monitor new Process

Press OK to launch Skype for Business and after the logon is complete we have a list of the required synchronization objects:

Next step is to create a container by capturing the Skype for Business installation with our Auto Packager and add the following lines to the MutexIsolation section of the Redirections.xml file:

   <MutexName>Global\Office Communicator_</MutexName>

Since I already have Skype for Business installed on my machine, I am going to leverage a lesser known feature of our redirection engine (AAV) which is to run a natively installed application and apply redirections to it.

This means that I can run Skype for Business with and without AAV (our redirection engine) concurrently, without installing it twice and without even creating a container!

To make sure we can use different settings (e.g. accounts) between the different Skype for Business instances we need to virtualize the folders and registry keys where Skype for Business writes it’s settings.

Fortunately a Process Monitor trace and a quick look at the filesystem revealed that all required was 2 folders and 2 registry keys.

For the filesystem add this to the Redirections.xml:


This will redirect the Lync folder to Lync2 in both Local- and Roaming Application Data.

Next add these registry redirections to Redirections.xml:


Finally add the Skype for Business executable (lync.exe) to Programs.xml:

   <Args>/f "C:\Program Files (x86)\Microsoft Office\root\Office16\lync.exe" %FILEARGS%</Args>
   <WorkingDirectory />
   <WaitCondition TimeoutInSeconds="0">None</WaitCondition>

Cloudhouse joins G-Cloud 12

Moving the UK public sector to the cloud just got a whole lot easier. Cloudhouse application compatibility packaging is now available from the G Cloud 12 Digital Marketplace.

Migrate ALL applications to Amazon AppStream 2.0 and AWS WorkSpaces

Migrate ALL your desktop applications to Amazon Workspaces or Amazon AppStream 2.0 with Cloudhouse.

The Magic of Compound Application Virtualization

I am Priya Saxena, a supermom, virtualization enthusiast and a developer by heart. I started my career 11 years ago as a passionate engineering graduate