Show Lync in foreground when it starts

 

 

Registry locations

HKCU\Software\Microsoft\Communicator\AutoOpenMainWindowWhenStartup

Allowed registry values

· 0 – The Contact List will not display onscreen when you logon to Windows

· 1 – The Contact List will display onscreen when you log on to Windows

Registry value type

REG_DWORD

Default setting

1: Lync is automatically brought to the foreground when it starts

 

To be perfectly honest, when we first saw this option in the Office Communicator 2007 R2 user interface it didn’t make much sense to us. Back then the setting was labeled Automatically open the contact list when Communicator starts, and we didn't understand what that was supposed to mean: after all, wasn't the Contact List always open when you started Communicator?

 

As it turns out, however, this option actually did make sense; you just had to know what it meant. (Fortunately the setting has been relabeled in Microsoft Lync 2010, which makes it much easier to understand.) So what happens if this option is enabled? This happens: each time you start Lync the Contact List will appear on screen and in the foreground, something like this:

 

 

And what happens if you don’t select this option? In that case, you won’t see the Contact List on screen; instead, all you’ll see is the Microsoft Lync icon running in the task bar or the Notification area:

 

 

 Either way, it’s up to you. Do you want to see Lync jump into the foreground every time it starts, or would you prefer to have it start unobtrusively in the background? To be honest, it makes no difference to us at all.

 

Oh, good point: if it’s up to you to configure this option then how exactly do you configure this option? Well, one way is to select (or clear) the Show Lync in foreground when it starts checkbox. (We told you it had a much better label now than it did in 2007 R2.) That’s a checkbox you’ll find on the Personal tab of the Options dialog box:

 

You can also programmatically control what happens to the Contact List each time you start Lync. If you’d like to actually see Microsoft Lync each time you start the application then all you need to do is set the HKCU\SOFTWARE\Microsoft\Communicator\AutoOpenMainWindowWhenStartup registry value to 1. Happy just to have the Lync icon appear in the task bar or Notification area? Then set the registry value to 0. Life doesn’t get any better than that, does it?

 

And don’t worry: we’re about to show you exactly how to do that.

 

For starters, here's a Windows PowerShell script that retrieves the current value of AutoOpenMainWindowWhenStartup from the local computer. If you'd rather retrieve this value from a remote computer, simply set the value of the variable $computer to the name of that remote computer. For example:

 

$computer = "atl-ws-001.litwareinc.com"

 

Here's the script for retrieving the value:

 

$computer = "."

 

$registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

$key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

 

$value =$key.GetValue("AutoOpenMainWindowWhenStartup",$null)

if ($value -eq 1) {$value = "Yes"}

if ($value -eq 0) {$value = "No"}

Write-Host "Show Lync in foreground when it starts: $value"

 

And here's a script that sets the value of AutoOpenMainWindowWhenStartup. In this case, the script causes Lync to open in the foreground; that's done by setting AutoOpenMainWindowWhenStartup to 1. To have Lync open up in the background, set AutoOpenMainWindowWhenStartup to 0:

 

$key.SetValue("AutoOpenMainWindowWhenStartup",0,"DWORD")

 

Here you go:

 

$computer = "."

 

$registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

$key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

 

$key.SetValue("AutoOpenMainWindowWhenStartup",1,"DWORD")