Share via


Always on Top

 

 

Registry locations

HKCU\Software\Microsoft\Communicator\AlwaysOnTop

Allowed registry values

· 00 00 00 00 – The Contact List does not appear on top of all the other windows on your desktop

· 01 00 00 00 – The Contact List appears on top of all the other windows on your desktop

Registry value type

REG_BINARY

Default setting

00 00 00 00: Microsoft Lync is not always in the foreground

 

By default, the Microsoft Lync window acts just like any other window: when you click another application that application moves to the foreground and Lync recedes into the background. That’s fine, unless you’d really like Microsoft Lync to be visible to you at all times. (Because who could bear to be away from Lync for even a second, right?) What are you supposed to do if that's the behavior you want to see?

 

Well, one thing you can do is configure the Always on Top option from the Contact List menu:

 

 

Do that and the Contact List window will always remain on top of the other windows running on your desktop.

 

So is there another way to enable the Always on Top option? You bet there is: you can set the HKCU\SOFTWARE\Microsoft\Communicator\AlwaysOnTop registry value to 01 00 00 00, something you might do using a Windows PowerShell script. That gives you a programmatic way to select the Always on Top option, and to make sure that Lync stays in the foreground any time you switch to another application.

 

Note. Tired of looking at Lync all the time? Then simply set AlwaysOnTop to 00 00 00 00. That will cause the Contact List to once again function as a regular old window.

 

Two things you should keep in mind when setting the Always on Top option. First, this setting applies only to the Contact List. If you select this option, the Contact List window will always stay in the foreground; however, any secondary windows you open (such as an instant messaging Conversation Window) will not stay in the foreground. Instead, those windows will recede into the background, just like most windows do.

 

Second, you might wonder what happens when Lync encounters another application – such as Task Manager – that wants its window to stay on top of other windows.

 

Note. To be honest, that was something we were curious about, too. Having two windows that demanded to always be on top sounded like one of those "cause a rift in the space-time fabric" sort of things.

 

So what does happen if two windows want to be the topmost window? In a case like that, both Lync and Task Manager will remain on top of all your other windows. However, if you click on Lync it will move into the foreground on top of Task Manager, like so:

 

 

And if you click on Task Manager? You got it; Task Manager will move into the foreground on top of Lync:

 

 

And, as near as we can tell, nary a rip in the space-time fabric.

 

Seeing as how we were talking about scripts a few minutes ago, let's show you a script; in particular, let's show you a script that retrieves the current value of AlwaysOnTop 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 how you retrieve the value:

 

$computer = "."

 

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

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

 

 

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

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

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

Write-Host "Always on tops: $value"

 

And here's another script (hey, two in one article!), a script that sets the value of AlwaysOnTop. In this case, the script enables the Always on Top feature; that's done by setting AlwaysOnTop to 1. To disable this feature just set AlwaysOnTop to 0:

 

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

 

Here's script No. 2:

 

$computer = "."

 

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

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

 

$key.SetValue("AlwaysOnTop",[byte[]]@(1,0,0,0),"Binary")