Stop Microsoft Teams Auto-start

If you planning to deploy Microsoft Teams to all users but you don’t want teams to auto-start when Windows start, how can you solve this?

If you open settings in Microsoft Teams you have the option to deselect ”Auto-start application” and the next time you start your computer Teams won’t start. This is an easy method if you want to change this for yourself or a few users but I wanted to stop Teams from starting on multiple computers and without configuring them one-by-one.

With help of Process Monitor I noticed that when I untick ”Auto-start application” teams removes a registry entry “com.squirrel.Teams.Teams” in “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run”, well that is a easy fix, just remove that from the registry and it’s fixed. But Teams didn’t agree and recreated the Run-registry entry. What?

I continued testing with Process Monitor and found that Teams is also writing to some files located in %AppData%\Roaming\Microsoft\Teams, after some digging I found in the file desktop-config.json that the value openAtLogin changed from true to false.

I opened Teams Settings and disabled auto-start manually, then I copied desktop-config.json to another computer and removed the com.squirrel.Teams.Teams value from the registry. When I started teams I noticed that com.squirrel.Teams.Teams were not added to registry again, and Teams did not auto-start when Windows started.

The solution would then be to copy desktop-config.json from a user with auto-start disabled and include that in your deployment script and delete com.squirrel.Teams.Teams from HKCU\Software\Microsoft\Windows\CurrentVersion\Run.

reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v com.squirrel.Teams.Teams /f

I’m not sure exactly what is saved in desktop-config.json but in my small test with one target computer, I didn’t see any problems with copying it to another computer with another user signed in than I used on the source computer. There is some fun settings like windows size and full screen option you might want to change at the same time.

Users can manually change their settings and reactivate auto-start if they want to.

Installation switch

When you deploy Microsoft Teams to multiple users it is possible to use a installation switch that stops Teams client to start automatic until the user starts Teams. After the user started the Teams client once it will continue start automatic when Windows starts up.

For 32-bit version

msiexec /i Teams_windows.msi OPTIONS=”noAutoStart=true”

For 64-bit version

msiexec /i Teams_windows_x64.msi OPTIONS=”noAutoStart=true”


Use this script from Paul Cunningham to deploy Teams
https://gallery.technet.microsoft.com/scriptcenter/Install-Teams-Desktop-b1ffd424

Read more about Microsoft Teams MSI here
https://docs.microsoft.com/en-us/microsoftteams/msi-deployment

Linus Cansby

Consultant work at UClarity, based in Göteborg, Sweden. Been working with Exchange, LCS, OCS, Lync, Skype, Teams and related stuff for a while. Mostly writing tips and news after getting questions from customers.

You may also like...

6 Responses

  1. Makorus says:

    Hi there. Does this still work for you?
    As of today, I’ve just tried your instructions and I can’t get it to work. That bloody registry key is always being recreated at login.

    • Linus Cansby says:

      Hi,
      I tried now and it works. Note that you have to change in the desktop-config.json first so that openAtLogin is false after that I should not recreate the registry key. At least it doesn’t recreates in my tests.

  2. Jose says:

    This doesn’t really work.. The registry key will be re-added if the user relaunches Teams. The only way it won’t be re-added is to manually configure the setting or try this during install:
    https://www.joseespitia.com/2018/08/30/how-to-disable-microsoft-teams-from-running-at-logon/

    Hope it helps someone!

  3. Rob says:

    Not sure why other people are saying it doesn’t work, I’ve tested it a few times as long as “openAtLogin” is set to false AND the registry key is removed I can relaunch Teams all I want and the checkbox for “Auto-start Application” stays unchecked and the reg key does not recreate. We do a lot of automated installs on test stations where no one will ever use Teams, but the corporate image we use forces Teams on us. I had the registry part down but your post was the key to getting it to work reliably by removing the check mark from the settings dialog. Two lines in a batch file and I can disable the auto start for the generic test user. This may be an ongoing battle where every time Teams gets updated we have to do this all over again but we’ll see how that goes. Thanks much.

  4. Justin says:

    Excellent, thank you!

    We wrote a powershell script to edit the json file directly:

    $path = “$env:appdata\Microsoft\Teams\desktop-config.json”

    $configarray = Get-Content $path | ConvertFrom-Json

    $configarray.appPreferenceSettings.openAtLogin = ‘false’

    Set-Content $path ($configarray | ConvertTo-Json)

    Hope it helps someone!

  5. Kevin says:

    And to complete the process, add the following to @Justin script to delete the Teams registry property from the user’s Run key

    #Now we need to remove the startup entry from the registry.
    Get-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Run | Remove-ItemProperty -Name com.squirrel.Teams.Teams

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.