tis-microsoft-teams-appdata
1.4.0.32771-65
Microsoft Teams Machine-Wide Installation (Per-User Installation) - Microsoft Teams, also referred to as simply Teams, is a unified communication and collaboration platform that combines persistent workplace chat, video meetings, file storage (including collaboration on files)
8556 downloads
See build result See VirusTotal scan

Description
- package : tis-microsoft-teams-appdata
- name : Microsoft Teams
- version : 1.4.0.32771-65
- categories : Media,Messaging,Office
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Gaëtan SEGAT
- installed_size :
- editor : Microsoft
- licence : Proprietary
- signature_date : 2021-12-22T09:06:07.390688
- size : 128.30 Mo
- locale : all
- target_os : windows
- impacted_process : Teams
- architecture : x64
- Homepage : https://www.microsoft.com/microsoft-365/microsoft-teams/group-chat-software
- Conflicts :
control
package : tis-microsoft-teams-appdata
version : 1.4.0.32771-65
architecture : x64
section : base
priority : optional
name : Microsoft Teams
categories : Media,Messaging,Office
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Gaëtan SEGAT
description : Microsoft Teams Machine-Wide Installation (Per-User Installation) - Microsoft Teams, also referred to as simply Teams, is a unified communication and collaboration platform that combines persistent workplace chat, video meetings, file storage (including collaboration on files)
depends :
conflicts : tis-microsoft-teams
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 1.7
sources : https://docs.microsoft.com/microsoftteams/msi-deployment
installed_size :
impacted_process : Teams
description_fr : Microsoft Teams, aussi simplement appelé Teams, est une plate-forme de communication et de collaboration unifiée qui combine le chat, les réunions vidéo, le stockage de fichiers (comprend la collaboration sur les fichiers)
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : Microsoft
keywords : microsoft,teams,team,communication,collaboration,chat,video,meetings
licence : Proprietary
homepage : https://www.microsoft.com/microsoft-365/microsoft-teams/group-chat-software
package_uuid : 257f2721-6279-4eb4-8d03-3779eb0a8912
valid_from :
valid_until :
forced_install_on :
changelog : https://support.office.com/article/what-s-new-in-microsoft-teams-d7092a6d-c896-424c-b362-a472d5f105de
min_os_version : 6.1
max_os_version :
icon_sha256sum : c6e1224de3bf5ed2d252f9cee788480febfe2993b02cf91cf3258e7306274674
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : B+JGGZDvHPnMVSwo4cWOh7Y6bCcs6a5jKdTqp7IuY3l2Hb83S+v/28BhG1G98+bt210wHfChOQ/faREGbJr2fN0kv6KyZGQWl+luuRBTE2i1N0swRbDnAmB/Ugs5rczf9dD2UJqovzfUeGChwEfBOq+QUPEFyf7RlOWaEi2qbjS8pvT6aJH6rl/zzZ3s9tUhvnGqCG50G7OXM1IBKCtwlaferLK0qwhU6wr+tBlmyP2R8L2hEa2gTc4e/7KEqZ5uFOPXmOZyJGyJR2FVPP8YPs5VgbqbcXfQ/M3h4P/Y16y8meyb3dNibwk689wW3s/XvDBSRwhKFW5I8NaK3zgFrQ==
signature_date : 2021-12-22T09:06:07.390688
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import json
import platform
import time
import os
import tempfile
import codecs
import requests
#{731F6BAA-A986-45A4-8936-7C3AAAAA760B} Teams Machine-Wide Installer 1.3.0.12058 MsiExec.exe /I{731F6BAA-A986-45A4-8936-7C3AAAAA760B}
uninstallkey = []
# Installation procedure: https://docs.microsoft.com/fr-fr/microsoftteams/teams-for-vdi#install-or-update-the-teams-desktop-app-on-vdi
# Defining variables
bin_name_string = 'Teams_windows_%s_x64.msi'
bin_name_temp = 'Teams_windows_x64.msi'
download_url = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true"
silent_args = 'OPTIONS="noAutoStart=true" ALLUSERS=1' #OPTIONS="noAutoStart=true" ALLUSER=1 ALLUSERS=1
#silent_args = 'ALLUSER=1' #OPTIONS="noAutoStart=true" ALLUSER=1 ALLUSERS=1
app_name = 'Microsoft Teams'
app_name_short = 'Teams'
app_dir = makepath(programfiles32,'Microsoft','Teams')
app_path = makepath(app_dir, 'current','Teams.exe')
#sys_json_setup = makepath(app_dir,'setup.json')
#json_setup_content = json.loads('{"noAutoStart":true,"--exeName":"Teams.exe"}')
TASK_TEMPLATE=r"""\
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>%(created_on)s</Date>
<Author>WAPT</Author>
</RegistrationInfo>
<Triggers>
<TimeTrigger>
<StartBoundary>%(run_on)s</StartBoundary>
<EndBoundary>%(expired_on)s</EndBoundary>
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
<DeleteExpiredTaskAfter>PT0S</DeleteExpiredTaskAfter>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>%(cmd)s</Command>
<Arguments>%(parameters)s</Arguments>
</Exec>
</Actions>
</Task>
"""
def create_onetime_task_user(name,cmd,parameters=None, delay_minutes=2,max_runtime=10, retry_count=3,retry_delay_minutes=1):
"""creates a one time Windows scheduled task and activate it.
"""
run_time = time.localtime(time.time() + delay_minutes*60)
# task
if windows_version(2) <= Version('5.2',2):
# for win XP
current_account = get_current_user()
# windows xp doesn't support one time startup task /Z nor /F
hour_min = time.strftime('%H:%M:%S', run_time)
run_notfatal('schtasks /Delete /TN "%s" /F'%name)
return run('schtasks /Create /SC ONCE /TN "%s" /TR "%s %s" /ST %s /RU %s' % (name,cmd,parameters,hour_min,current_account))
else:
current_account = get_current_user()
xmlfile = tempfile.mktemp('.xml')
created_on = time.strftime('%Y-%m-%dT%H:%M:%S',time.localtime(time.time()))
run_on = time.strftime('%Y-%m-%dT%H:%M:%S',run_time)
expired_on = time.strftime('%Y-%m-%dT%H:%M:%S',time.localtime(time.time() + 90*24*3600))
codecs.open(xmlfile,'wb',encoding='utf8').write(TASK_TEMPLATE % locals())
result = run('schtasks /Create /F /TN "%s" /XML "%s"' % (name,xmlfile))
if isfile(xmlfile):
remove_file(xmlfile)
return result
def install():
# Initializing variables
package_version = control.version.split('-')[0]
bin_name = bin_name_string % package_version
app_name = control.name
# Uninstalling older versions if found
for uninstall in installed_softwares(name=app_name_short):
if Version(uninstall['version']) < Version(package_version):
print('Older %s version found (%s)' % (app_name, uninstall['version']))
print('Removing: %s (%s)' % (uninstall['name'], uninstall['version']))
run_notfatal(uninstall_cmd(uninstall['key']))
time.sleep(15)
# Installing the package system wide
print('Installing: %s' % bin_name)
install_msi_if_needed(bin_name,
properties=silent_args,
min_version=package_version,
accept_returncodes=[0,3010,1605,1614,1641],
timeout=900)
# Removing shortcuts
remove_desktop_shortcut(app_name)
def session_setup():
# Initializing variables
user_conf_dir = makepath(application_data,'Microsoft','Teams')
json_config = makepath(user_conf_dir,'desktop-config.json')
json_settings = makepath(user_conf_dir,'settings.json')
# Cleaning up desktop-config.json once
if registry_readstring(HKEY_CURRENT_USER,r'Software\WAPT\Teams','CleanDeskConfOnce') != 'Done':
if isfile(json_config):
remove_file(json_config)
if isfile(json_settings):
remove_file(json_settings)
print("Cleaning up Teams Desktop Conf Once")
registry_set(HKEY_CURRENT_USER,r'Software\WAPT\Teams','CleanDeskConfOnce','Done')
if not isrunning('Teams.exe'):
if force: #registry_readstring(HKEY_CURRENT_USER,r'Software\WAPT\Teams','CleanDeskConfOnce') != 'Done' or
if isdir(user_conf_dir):
remove_tree(user_conf_dir)
# No longer Prefill UPN
registry_set(HKEY_CURRENT_USER,r'Software\Microsoft\Office\Teams','SkipUpnPrefill',1,type=REG_DWORD)
# Define user settings (procedure: https://techcommunity.microsoft.com/t5/microsoft-teams/how-to-disable-check-for-updates-in-microsoft-teams/m-p/54644)
print('Setting up user settings')
if not isdir(user_conf_dir):
mkdirs(user_conf_dir)
# desktop-config.json
if isfile(json_config):
json_config_content = load_json(json_config)
else:
json_config_content = json.loads('{"appPreferenceSettings":{}}')
#json_config_content = json.load({})
json_config_content['appPreferenceSettings']['openAtLogin'] = True
json_config_content['appPreferenceSettings']['openAsHidden'] = True
json_config_content['appPreferenceSettings']['runningOnClose'] = True
json_config_content['appPreferenceSettings']['registerAsIMProvider'] = True #Teams comme chat Office
json_config_content['isForeground'] = True
json_config_content['wamFallbackInProgress'] = False #False aussi sur PC Agesys
json_config_content['disableWarningOnOpenKeyRegistered'] = True
json_config_content['isAppFirstRun'] = False
write_json(json_config,json_config_content)
# settings.json
if isfile(json_settings):
json_settings_content = load_json(json_settings)
else:
json_settings_content = json.loads('{"baseSettings":{},"initializedSettings":{},"preauthSettings":{"samplingRules":{}}}')
#json_settings_content = json.load({})
# Update part
json_settings_content['baseSettings']['enableBlockSilentUpdate'] = True
json_settings_content['baseSettings']['disableAllUsersAutoUpdate'] = True
json_settings_content['baseSettings']['enableUnAuthUpdates'] = False
#json_settings_content['initializedSettings']['disableAllUsersAutoUpdate'] = True
#json_settings_content['preauthSettings']['disableAllUsersAutoUpdate'] = True
#json_settings_content['preauthSettings']['samplingRules']['updateNotificationEnabled'] = False
# Telemetry part
json_settings_content['baseSettings']['enableAdalMacTelemetryV2'] = False
json_settings_content['baseSettings']['enableAdalWinTelemetry'] = False
json_settings_content['baseSettings']['proplusAdditionalTelemetryEnabled'] = False
json_settings_content['baseSettings']['regionInTelemetryEnabled'] = False
json_settings_content['baseSettings']['tenantRegionInTelemetryEnabled'] = False
#json_settings_content['baseSettings']['enableRegisterProtocolToRoot'] = False
#json_settings_content['initializedSettings']['tenantRegionInTelemetryEnabled'] = False
#json_settings_content['preauthSettings']['tenantRegionInTelemetryEnabled'] = False
#json_settings_content['preauthSettings']['samplingRules']['tenantRegionInTelemetryEnabled'] = False
# Other part
#json_settings_content['preauthSettings']['registerAddinOnMeetingPolicySettingsSync'] = False
write_json(json_settings,json_settings_content)
# Removing shortcuts
if registry_readstring(HKEY_CURRENT_USER,r'Software\WAPT\Teams','RemoveUserIconOnce') != 'Done':
print("Removing Teams Desktop Icon")
create_onetime_task_user('RemoveTeamsUserDesktopsShortcut_%s' % get_current_user(), 'cmd', r'/C del /f "%USERPROFILE%\Desktop\Microsoft Teams.lnk"', delay_minutes=5)
remove_user_desktop_shortcut(app_name)
registry_set(HKEY_CURRENT_USER,r'Software\WAPT\Teams','RemoveUserIconOnce','Done')
def uninstall():
# Initializing variables
processes_to_kill = control.impacted_process.strip().replace(' ','').split(',')
count = 30 # 30x10=300sec maximum waiting
# Uninstalling the package
for uninstall in installed_softwares(name=app_name_short):
killalltasks(processes_to_kill)
print('Uninstalling: %s' % uninstall['name'])
run_notfatal(uninstall_cmd(uninstall['key']))
while installed_softwares(name=app_name_short):
count -= 1
if count == 0:
error('Unable to uninstall: %s' % app_name)
time.sleep(10)
# Removing remaining files
if isdir(app_dir):
killalltasks(processes_to_kill)
remove_tree(app_dir)
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = download_url
#url = 'http://aka.ms/teams64bitmsi'
# Getting latest version from official sources
print("URL used is: %s" % url)
version = requests.head(url, proxies=proxies).headers['Location'].split('/')[-2].replace('00','0')
latest_bin = bin_name_string % version
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % download_url)
# Downloading latest binaries
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin)
if Version(version) != Version(version_from_file) and version_from_file != '':
print("Changing version to the version number of the binary (from: %s to: %s)" % (version, version_from_file))
os.rename(latest_bin, bin_name_string % version_from_file)
version = version_from_file
else:
print("Binary file version corresponds to online version")
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
result = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.version = '%s-%s' % (Version(version), control.version.split('-', 1)[-1])
#control.set_software_version(version)
control.save_control_to_wapt()
# Deleting outdated binaries
remove_outdated_binaries(version)
# Validating or not update-package-sources
return result
def load_json(json_filename):
with open(json_filename) as json_file:
data = json.load(json_file)
return data
def write_json(json_filename,data):
with open(json_filename, 'w') as outfile:
json.dump(data, outfile, sort_keys=True, indent=4, default=str)
def get_proxies():
if platform.python_version_tuple()[0] == '3':
from urllib.request import getproxies
else:
from urllib import getproxies
return getproxies()
def get_proxies_from_wapt_console():
proxies = {}
if platform.system() == 'Windows':
waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
else:
waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
if isfile(waptconsole_ini_path):
proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
if proxy_wapt:
proxies = {'http': proxy_wapt, 'https': proxy_wapt}
return proxies
def get_version_from_binary(filename, parameter='ProductVersion'):
if filename.endswith('.msi'):
return get_msi_properties(filename)[parameter]
else:
return get_file_properties(filename)[parameter]
def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
if type(list_extensions) != list:
list_extensions = [list_extensions]
if list_filename_contain:
if type(list_filename_contain) != list:
list_filename_contain = [list_filename_contain]
list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
for file_ext in list_extensions:
for bin_in_dir in glob.glob('*%s' % file_ext):
if not version in bin_in_dir:
remove_file(bin_in_dir)
if list_filename_contain:
for filename_contain in list_filename_contain:
if not filename_contain in bin_in_dir:
remove_file(bin_in_dir)
fc4383b0058fd55a043dc5cdd8f7e9f06af7c028f633888984f76d7023973d2f : setup.py
c6e1224de3bf5ed2d252f9cee788480febfe2993b02cf91cf3258e7306274674 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
c68de6a90b62ca5b8098d0d3dd12d4908e572fa70db4764f9495f9f3cde60702 : luti.json
f247d0f8d5f0a118b48f5d0cec02e164cca2ba4e4e74119f035f3906b88c343b : Teams_windows_1.4.0.32771_x64.msi
9d043940acf011e52cb5b55212d13f35bcfa044b3139b205f2720550b85c6ae6 : WAPT/control