Stop MS Teams Auto Starting

Teams installation with no auto start switch has issues in many levels where it’s not honoring the switch. Even though it installs and won’t auto launch for the first time, when the user logs off and log back in, it auto launches and creating the below registry key in the HKEY User hive. 

Location: Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 
String name: com.squirrel.Teams.Teams 
Value: C:\Users\<username>\AppData\Local\Microsoft\Teams\Update.exe –processStart “Teams.exe” –process-start-args “–system-initiated” 

You can try deleting it for that user, but next time the user open Teams, it re-creates the entry.  

Also because the Teams app files are getting populated in the Users’ App Data folder, uninstalling Teams is not a straight forward thing.  

Going back to MS’s recommendation of using the parameter works IF you run a CMD with elevated permissions and run the command in that.  

But what about a batch rollout? 

SCCM and GPO will allow you to perform a batch installation of the machine-wide msi installer, however it will still launch when the user logs in to the computer which fails the initial goal. 

Solution 

Long way 
Create a GPO for a scheduled task for the workstation to run with the “Run with Highest Privileges” in the Actions tab. 

The goal of this is the GPO runs the scheduled task and the action in the task will run with the highest privileges. 

Select the Start a program, with the parameter /qn OPTIONS=”noAutoStart=true”  

/qn is for quiet installation 

OPTIONS=”noAutoStart=true” is for no Auto Start  

Short way 
If you have an inventory tool which also can deploy packages (Eg: Lansweeper)  you can deploy the same with the msiexec command and with the /qn and OPTIONS=”noAutoStart=true”  

msiexec /i \\<path>\Teams_windows_x64.msi OPTIONS=”noAutoStart=true” 

Key to remember – Select the option of Run with the SYSTEM Account and it will install as the same way we manually installed with the elevated CMD. 

Result and How to test 
This will run the Teams Machine-Wide installer in the quiet mode and with no auto launch. 

Log off and login to the computer – it will take few minutes to run the Teams.exe file in the file in C:\Program Files (x86)\Teams Installer folder. 

Teams shortcut will appear on the desktop, but will not auto launch. 

Try logging off and logging in to the computer again – will not auto launch. 

This will create the Startup entry and the registry entry in the User Hive after the 1st manual launch. 

Hope this helps in your Teams batch rollout. 

image from: Jigsaw Vectors by Vecteezy

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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