Automatically start Lync when I log on to Windows



 

 

Registry locations

HKCU\Software\Microsoft\Communicator\

 AutoRunWhenLogonToWindows

Allowed registry values

·         0 – Lync will not automatically start when you logon to Windows

·         1 – Lync will automatically start when you log on to Windows

Registry value type

REG_DWORD

Default setting

1: Lync starts when you log on to Windows

 

It’s one thing to install Microsoft Lync on all your computers; it’s another thing to make sure that people actually use the program. One way to encourage people to use Microsoft Lync is to have the application automatically start each time users log on to Windows; that way no one will “forget” to start the program, or forget how to start the program.

 

You can configure Lync to automatically start each time a user logs on to Windows by checking the aptly-named Automatically start Lync when I log on to Windows check box:

 

 

Alternatively, you can achieve the same result by modifying the HKCU\SOFTWARE\Microsoft\Communicator\AutoRunWhenLogonToWindows registry value. Set this value to 1 to effectively select the check box, and to have Lync start each time you log on to Windows. Set this value to 0 to cancel auto logon. In the latter case, you’ll then need to manually start Lync each time you start Windows.

 

So how can you modify this registry value? One way is to use Windows PowerShell. For example, the following script retrieves the current value of AutoRunWhenLogonToWindows on the local computer. If you’d rather pull this value off 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 we were just talking about:

 

$computer = “.”

 

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

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

 

$value =$key.GetValue(“AutoRunWhenLogonToWindows”,$null)

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

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

Write-Host “Automatically start Lync when I log on to Windows: $value”

 

And what if you want to change that value? That’s fine; what follows is a script that causes Lync to start each time you log on to Windows; that’s done by setting AutoRunWhenLogonToWindows to 1. To not have Lync auto-start each time you log on to Windows, set AutoRunWhenLogonToWindows to 0:

 

$key.SetValue(“AutoRunWhenLogonToWindows”,0,”DWORD”)

 

Here’s what we’ve been talking about:

 

$computer = “.”

 

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

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

 

$key.SetValue(“AutoRunWhenLogonToWindows”,1,”DWORD”)

 

 

Comments (4)

  1. jorge says:

    Hi,

    I've just deployed OCS 2007 via GPO Software Package and OCS doesn't start when logon to Windows. One you start OCS manually, next time you logon to Windows OCS starts automatically. But my intention is that OCS starts just fater installation so that users realise they have OCS available on their computer.

    I've also set the key value to 1 and OCS doesn't start automatically either. In fact, this key value is the only one in the OCS registry key.

    Any idea?.

    Thank you.

  2. Greg Stemp says:

    Hey, Jorge. Did you need to reboot the computer in order to get this to work, or did you log on, log off, and then log back on again?

  3. jorge says:

    If I install OCS 2007 through a Software Installation Group Policy it doesn't matter how many times the user logon to the domain, OCS never starts. The user have to logon to the OCS server once to get the OCS client starts automatically every time the user logon to the domain.

    May be I'm not explaining very well.

    Thank you.

  4. greg says:

    Hey, Jorge. Two more questions. First, is the GPO configured as a User policy or a Computer policy? Second, when the user logs on to Communicator the first time does the UI show that the option to start each time Windows starts has been selected?

Skip to main content