Forum Discussion

chenrylee's avatar
chenrylee
Brass Contributor
Jun 28, 2019
Solved

How to Prevent Teams from Auto-Launch

Hi guys,

I plan to deploy Teams in my company, and there's a headache.

 

I don't want Teams auto launches when system starts, and when I install it, I use this script:

msiexec /i "%temp%\Teams_windows_x64.msi" /QN OPTIONS="noAutoStart=true"
It works, and after a reboot, Teams icon appears on desktop but Teams doesn't launch.
And I double-click the icon to start this app, then close it, and then restart my laptop, Teams auto launched, and I found the registry item:
Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Value: com.squirrel.Teams.Teams
Data: %LocalAppData%\Microsoft\Teams\Update.exe --processStart "Teams.exe" --process-start-args "--system-initiated"
 
My Question is:
Is there a way to set "auto-start application" is uncheched as default option?
 
Thank you in advance. :)

46 Replies

  • JonasB's avatar
    JonasB
    Brass Contributor
    Can this help?
    https://osddeployment.dk/2019/08/10/use-admx-policy-to-prevent-microsoft-teams-from-starting-automatically-after-installation-with-intune/
    • Aaron Guilmette's avatar
      Aaron Guilmette
      Former Employee

      The GPO option only works before Teams is installed.  Yes, you need to use a GPO to manage a not-installed application before you install it, since it automatically configures itself for auto-launch after the user does it.  Afterwards, it's a per-user setting.

       

      JonasB 

  • chenrylee's avatar
    chenrylee
    Brass Contributor

    There's an article from Microsoft: 

    https://docs.microsoft.com/en-us/deployoffice/teams-install#use-group-policy-to-prevent-microsoft-teams-from-starting-automatically-after-installation

     

    A policy works with confirmation.

  • chenrylee's avatar
    chenrylee
    Brass Contributor

    I find a workaround. Teams settings are stored in a json file, so after installation, I can change the settings by a post-installation script which modifies the configuration file.

    #region: Prevent Teams from auto-start
    # If Teams auto-start entry exists, delete it
    $entry = $null -eq (Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run)."com.squirrel.Teams.Teams"
    if ( !$entry ) {
    Remove-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run -Name "com.squirrel.Teams.Teams"
    }
    # Define Teams configuratin file path
    $Teams_config_file = "$env:APPDATA\Microsoft\Teams\desktop-config.json"
    $configs = Get-Content $Teams_config_file -Raw
    # If Teams already doesn't auto-start, break out the script.
    if ( $configs -match "openAtLogin`":false") {
    break
    }
    # If Teams already ran, and set to auto-start, change it to disable auto-start
    elseif ( $configs -match "openAtLogin`":true" ) {
    $configs = $configs -replace "`"openAtLogin`":true","`"openAtLogin`":false"
    }
    # If it's a fresh file, add configuration to the end
    else {
    $disable_auto_start = ",`"appPreferenceSettings`":{`"openAtLogin`":false}}"
    $configs = $configs -replace "}$",$disable_auto_start
    }
    # Overwritten the configuration with new values.
    $configs | Set-Content $Teams_config_file
    #endregion
    • ChopperDude 6's avatar
      ChopperDude 6
      Copper Contributor
      What a ridiculous suggestion. People use their computer the way they want. You're just as bad as those who ask "Why would you want to do that???" Because I have a want or requirement to do so!! I personally believe NOTHING should auto-start. Do you want all office application to auto-start? If not, then you should just use the web version...right?? with this mind-set; just use a Chrome Book, that way everything is the web version. please.......just because you like something, that doesn't mean everyone else is wrong.
      • chenrylee's avatar
        chenrylee
        Brass Contributor

        Hi adam deltinger 
        Thank you for your kind reply, I tried this policy before, and it is equivalent with the switch `OPTIONS="noAutoStart=true"`, Teams won't be auto-launched until someone double click the icon.

        I think it's a logical bug, and in my opinion, I turn the autostart off, it means I don't want to auto-launch Teams even someone double-clicks the icon.

        Regards,
        C. L

  • Hi chenrylee

    AFAIK, not currently possible. Whilst you can script it or have a user uncheck it in the settings it does not occur by default

    There are multiple uservoices of disabling the start up option, such as this

    https://microsoftteams.uservoice.com/forums/555103-public/suggestions/33728680-disable-startup-option

    There is one here to turn off autostart for the entire tenant which may be closer to what you need.

    https://microsoftteams.uservoice.com/forums/555103-public/suggestions/33922291-disbale-autostart-in-teams-app-for-the-entire-tena

    If these don't cover exactly what you need I would raise this as a new uservoice. To note however, it could be some time to get picked up and really, I think the general desire from organisations to use Teams is more to have autostart on by default rather than off

    Hope that answers your question!

    Best, Chris
    • Nme's avatar
      Nme
      Copper Contributor

      ChrisHoardMVP, I think you are correct that in the main, business leaders would prefer that deployed MS Team installations auto-start forcing users to interact with the application. However Microsoft is once again forgetting history and missing a trick by NOT giving MS Teams users a choice to prevent auto-start. The "illusion of choice" is better than "no choice" at all, so auto-start a stub instead of the full app with it's plugins and extensions. My main workstation is a dual boot Mac for software development and production. We use Teams for remote meetings once a week, so I don't require it auto-starting every time I swap OSes daily. MS Teams establishes the auto-start automatically and even reestablishes auto-start when previously removed, just like a virus. This is poor form on Microsoft's part.

    • Sanford Kaplan's avatar
      Sanford Kaplan
      Copper Contributor

      ChrisHoardMVP 

       

      Sorry. I am completely at sea. I now get the "Teams" pop-up everytime I start Edge. I do not need nor want "Teams." The two links you provided did not really help me. How can I stop "Teams" from appearing everytime I try to access Edge? Thanks.  oilinvestor13@outlook.com

      • Dennis Ameling's avatar
        Dennis Ameling
        Copper Contributor

        On July 9, Microsoft released new ADMX template files (4882.1000) to prevent Teams from starting automatically after installation (on every logon) until the user starts the program manually. Instructions can be found here: https://docs.microsoft.com/en-us/deployoffice/teams-install#use-group-policy-to-prevent-microsoft-teams-from-starting-automatically-after-installation

        GPO name is "Prevent Microsoft Teams from starting automatically after installation" under User Configuration\Policies\Administrative Templates\Microsoft Teams

    • Alejandro1111's avatar
      Alejandro1111
      Copper Contributor

      ChrisHoardMVPHi, this may not be the right place, but I am having issues working with team conversations. When we replay to a conversation, it gets moved down as the most recent. We need it to stay in the order which was received and not move as the most recent.... Any help? Thanks

      • adam deltinger's avatar
        adam deltinger
        MVP
        Yeah 🙂 a new post would be better!

        Anyway, no you can’t change this I’m afraid

Resources