06-27-2019 07:23 PM
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"
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"
06-28-2019 01:45 AM
Solution06-28-2019 02:44 PM
06-28-2019 04:10 PM
06-30-2019 10:40 PM
06-30-2019 10:44 PM - edited 07-01-2019 01:26 AM
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
07-01-2019 04:07 AM
07-01-2019 07:19 PM
07-03-2019 08:56 AM - edited 07-11-2019 06:45 PM
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
07-28-2019 11:38 AM
07-30-2019 11:03 PM
There's an article from Microsoft:
A policy works with confirmation.
08-12-2019 04:50 AM
08-12-2019 09:34 AM
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.
08-14-2019 12:29 PM
@Christopher HoardHi, 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
08-14-2019 12:38 PM
08-20-2019 09:08 AM
You can create a GPO to delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run com.squirrel.Teams.Teams
08-20-2019 09:41 AM
@MrJoshuaThat sounds great, but not sure what GPO is or how to do that, will the change work on all devices example an Ipad, we see is happening on the desktop app and the ipad app, if more information will be appreciated! thank you
08-21-2019 07:02 AM
08-21-2019 08:03 AM
08-21-2019 08:05 AM
That GPO should run each time the user logs in and it should delete the registry key again if the user launches the Teams Application.