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