Lync/SfB Client tries to use proxy server instead of direct connection when using Proxy PAC on Windows 7

Update 2016/08/16 – This only happens on Windows 7, for Windows 8.1 and Windows 10 we don’t need to change the Proxy PAC file.

Recently we received some reports saying that Lync 2013 and Skype for Business 2015/2016 clients were trying to use a Proxy Server for lyncdiscover and lyncdiscoverinternal URLs when the Proxy was configured using a Proxy PAC script.

During the discovery process, the Lync/SfB client will check the Proxy PAC file with the following URLs:



For reference, here is a copy of my Proxy PAC file:

function FindProxyForURL(url, host) {

 /* Proxy all other hosts in gears.lab domain */
 if ((shExpMatch(host, "*.gears.lab"))) { return "DIRECT";}

 else { return "PROXY proxy.comm.lab:8080";}


We would expect that the following condition would cover the discovery URLs:

shExpMatch(host, “*.gears.lab”)

But it doesn’t, because the host variable will be:


Although the previous URL is valid it will cause issues in Windows 7.

We currently have two known workarounds:

1) Using the URL

This will match all the discovery URLs:

if ((shExpMatch(url, “http*://lyncdiscover*.gears.lab*”))) { return “DIRECT”;}

2) Using URL and Substring

This workaround requires that you check the length of each URL, but still it is also a valid alternative:

if (url.substring(0,29) == “http://lyncdiscover.gears.lab”) {return “DIRECT”;}
if (url.substring(0,30) == “https://lyncdiscover.gears.lab”) {return “DIRECT”;}
if (url.substring(0,37) == “http://lyncdiscoverinternal.gears.lab”) {return “DIRECT”;}
if (url.substring(0,38) == “https://lyncdiscoverinternal.gears.lab”) {return “DIRECT”;}

OCS 2007 R2 Cumulative Update List: December 2012

While ago we had to compile a list of the cumulative updates for Office Communications Server 2007 R2.

If you are still on Office Communications Server 2007 R2 please consider an upgrade to, at least, Lync Server 2013:

Migration from Office Communications Server 2007 R2 to Lync Server 2013

There isn’t a migration path from Office Communications Server 2007 R2 to Skype for Business Server 2015:

Plan to upgrade to Skype for Business Server 2015

  • Set up a new Skype for Business Server 2015 environment.
  • Or if your hardware and software meet the requirements for Skype for Business Server 2015, upgrade to Lync Server 2013, and then upgrade to Skype for Business Server 2015 by using the new In-Place Upgrade feature.

The latest updates for Office Communications Server 2007 R2 and how to update each server role is described here:

Updates for Communications Server 2007 R2

Download the latest Cumulative Update for Microsoft Office Communications Server 2007 R2

Here is the table with the list of updates:

Version Cumulative Update KB Article
3.5.6907.266 December 2012 KB2764850
3.5.6907.250 April 2012 KB2695383
3.5.6907.236 September 2011 KB2590698
3.5.6907.225 March 2011 KB2501719
3.5.6907.221 November 2010 KB2404547
3.5.6907.209 July 2010 KB983472
3.5.6907.196 April 2010 KB978008
3.5.6907.83 January 2010 KB977345
3.5.6907.56 October 2009 KB975611
3.5.6907.37 July 2009 KB969821
3.5.6907.0 RTM NA