Pacchetto Teams e funzionalità "Meeting Experience"

Domande sul packaging WAPT / Richieste e assistenza sui pacchetti Wapt.
Regole del forum
Regole del forum della community
* Supporto in inglese su www.reddit.com/r/wapt
* Supporto della community in francese disponibile su questo forum
* Si prega di anteporre [RISOLTO] al titolo dell'argomento se è stato risolto.
* Si prega di non modificare un argomento contrassegnato con [RISOLTO]. Aprire un nuovo argomento facendo riferimento a quello precedente.
* Specificare la versione di WAPT installata, la versione completa e il numero di build (2.2.1.11957 / 2.2.2.12337 / ecc.) nonché l'edizione Enterprise/Discovery.
* Le versioni 1.8.2 e precedenti non sono più supportate. Le uniche domande accettate relative alla versione 1.8.2 riguardano l'aggiornamento a una versione supportata (2.1, 2.2, ecc.).
* Specificare il sistema operativo del server (Linux/Windows) e la versione (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specificare il sistema operativo della macchina di amministrazione/creazione dei pacchetti e della macchina con l'agente problematico, se applicabile (Windows 7/10/11/Debian 11/ecc.).
* Evitare di porre più domande quando si apre una discussione, altrimenti potrebbe essere ignorata. Se ci sono più discussioni, aprirle separatamente, preferibilmente una dopo l'altra e non tutte contemporaneamente (ovvero, non intasare il forum).
* Includere frammenti di codice, screenshot e altre immagini direttamente nel post. I link a Pastebin, Bitly e altri siti di terze parti verranno sistematicamente rimossi.
* Come in qualsiasi forum della community, il supporto è fornito volontariamente dai membri. Se si necessita di supporto commerciale, è possibile contattare il reparto vendite di Tranquil IT al numero 02.40.97.57.55
pierre.baridon
Messaggi: 12
Registrazione: 14 nov 2020 - 10:55
Posizione: Clermont-Ferrand

14 novembre 2020 - 11:05

Ciao a tutti,

Da un po' di tempo i nostri utenti ci chiedono la funzionalità di Teams "Abilita l'esperienza di riunione / Modalità Insieme", disponibile da quest'estate / inizio settembre.
Togethermode.png
Togethermode.png (53,35 KB) Visualizzato 11618 volte
Tuttavia, questa funzione era disponibile (con la stessa versione client) nelle installazioni autonome ma non nelle installazioni tramite il pacchetto Teams (distribuito con il pacchetto WAPT per tutti gli utenti sulla workstation in una versione fissa).
Dopo una ricerca piuttosto lunga, ho capito che questa funzione non era disponibile negli ambienti VDI.
E il fatto che l'ambiente VDI sia simulato nell'installazione del pacchetto blocca di fatto questa funzionalità.

Per aggirare questo problema, ho adattato lo script per eliminare le voci di registro "VDI" una volta installato il file MSI. E poi, magicamente, una volta svuotata la cache di Teams, appare la funzionalità tanto attesa...

Pensi che l'eliminazione delle voci di registro "VDI" dopo l'installazione del pacchetto msi possa avere qualche impatto?

Sinceramente,

Roccia
- Versione WAPT installata (2.1.0 Enterprise)
- Sistema operativo del server: Debian
- Sistema operativo della macchina per l'amministrazione/creazione dei pacchetti: Windows 10
Avatar utente
Gaetano
Messaggi: 169
Iscrizioni: 8 agosto 2019 - ore 10:16
Posizione: Tolosa

16 novembre 2020 - 09:56

Ciao,
grazie per il feedback. Anch'io stavo pensando di fare la stessa cosa.

Potresti condividere il tuo script, per favore? Potrei testarlo in un ambiente di pre-produzione con 30 macchine e verificare se ci sono effetti collaterali.
Grazie.
Yoann
Messaggi: 51
Registrazione: 24 luglio 2019 - 09:39

17 novembre 2020 - 9:45

Salve,

certo che questo ha un impatto.

Le chiavi di registro vengono aggiunte per simulare un ambiente VDI e consentire l'installazione con l'argomento ALLUSER=1 (senza la S).
Questo permette a Microsoft Teams di essere installato nella C:\Program Files (x86)\Microsoft\Teams e non nella cartella %APPDATA%.

Non so quali potrebbero essere le conseguenze dell'eliminazione delle chiavi di registro dopo l'installazione...

Cordiali saluti.
Comunità WAPT 1.8
Avatar utente
Gaetano
Messaggi: 169
Iscrizioni: 8 agosto 2019 - ore 10:16
Posizione: Tolosa

17 novembre 2020 - 10:20

Una volta installato, non dovrebbe causare alcun problema.
Per gli aggiornamenti, è sufficiente reinstallarlo e disinstallarlo.
pierre.baridon
Messaggi: 12
Registrazione: 14 nov 2020 - 10:55
Posizione: Clermont-Ferrand

17 novembre 2020 - 22:40

Gaetan ha scritto: 16 nov 2020 - 09:56 Ciao,
grazie per il feedback. Anch'io stavo cercando di fare la stessa cosa.

Potresti condividere il tuo script, per favore? Potrei testarlo in un ambiente di pre-produzione con 30 macchine e vedere se ci sono effetti collaterali.
Grazie.
Buongiorno,
Ecco il codice per il pacchetto adattato (utilizzato con la versione 1.3.0.28779 del programma di installazione di Teams):
2 modifiche:
- Eliminazione delle chiavi di registro VDI una volta installate
- pulizia del profilo utente durante l'impostazione della sessione

Al momento è in fase di test su circa cinquanta macchine. Se qualcuno trova un modo per modificare l'impostazione ed evitare di cancellare l'intero profilo utente...

Codice: Seleziona tutto

# -*- coding: utf-8 -*-
from setuphelpers import *
import json
import platform
import time

#{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'
url_dl = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true"
silent_args = 'OPTIONS="noAutoStart=true" ALLUSER=1' #OPTIONS="noAutoStart=true" ALLUSER=1 ALLUSERS=1
#silent_args = 'ALLUSER=1' #OPTIONS="noAutoStart=true" ALLUSER=1 ALLUSERS=1
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"}')


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(uninstall_cmd(uninstall['key']))
            time.sleep(15)

    """ # Force uninstalling to make sure that we are using system-wide installation
    for uninstall in installed_softwares(name=app_name_short):
        print('Removing: %s' % uninstall['name'])
        run(uninstall_cmd(uninstall['key']))
        time.sleep(5) """

    # Adding fake WVD/VDI RegKey
    # Un/comment if needed
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.\VMware VDM\Agent','','')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Citrix\PortICA','','')
    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Teams','IsWVDEnvironment',1,type=REG_DWORD)

    # 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)

    # Disabling AutoStart
    if iswin64():
        registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run','Teams')
    registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\Run','Teams')

    # Removing shortcuts
    remove_desktop_shortcut(app_name)

    # Adding Firewall Rules for Teams
    run('netsh advfirewall firewall add rule name="%s" dir=in action=allow program="%s" enable=yes protocol=TCP profile=domain' % (app_name,app_path))
    run('netsh advfirewall firewall add rule name="%s" dir=in action=allow program="%s" enable=yes protocol=TCP profile=private' % (app_name,app_path))
    run('netsh advfirewall firewall add rule name="%s" dir=in action=allow program="%s" enable=yes protocol=UDP profile=domain' % (app_name,app_path))
    run('netsh advfirewall firewall add rule name="%s" dir=in action=allow program="%s" enable=yes protocol=UDP profile=private' % (app_name,app_path))

    # clean VDI register key (modif PB)
    if reg_value_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Teams','IsWVDEnvironment'):
        registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Teams','IsWVDEnvironment')

    if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.'):
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.\VMware VDM\Agent','',force=False)
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.\VMware VDM','',force=False)
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.','',force=False)

    if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Citrix\PortICA'):
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\Citrix\PortICA','',force=False)



def uninstall():
    # Initializing variables
    processes_to_kill = control.impacted_process.split(',')

    # Cleaning fake WVD/VDI RegKey properly
    # Un/comment if needed
    if reg_value_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Teams','IsWVDEnvironment'):
        registry_delete(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Teams','IsWVDEnvironment')
    if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.'):
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.\VMware VDM\Agent','',force=False)
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.\VMware VDM','',force=False)
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\VMware, Inc.','',force=False)
    if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Citrix\PortICA'):
        registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\Citrix\PortICA','',force=False)

    # Removing remaining files
    if isdir(app_dir):
        killalltasks(processes_to_kill)
        time.sleep(15)
        remove_tree(app_dir)


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')

    user_app_dir = makepath(user_local_appdata,'Microsoft','Teams')
    user_app_path = makepath(user_app_dir,'current','Teams.exe')
    user_app_updater = makepath(user_app_dir,'Update.exe')
    #user_app_version = registry_readstring(HKEY_CURRENT_USER,r'Software\Microsoft\Windows\CurrentVersion\Uninstall\Teams','DisplayVersion')

    user_app_progdata_dir = makepath('C:','ProgramData',get_current_user(),'Microsoft','Teams')
    user_app_progdata_path = makepath(user_app_progdata_dir,'current','Teams.exe')
    user_app_progdata_updater = makepath(user_app_progdata_dir,'Update.exe')

    user_silent_args_uninst = '--uninstall -s'
    processes_to_kill = control.impacted_process.split(',')

    # Uninstalling from user environment (procedure: https://docs.microsoft.com/microsoftteams/msi-deployment)
    if isfile(user_app_path):
        print('Uninstalling Microsoft Teams from user environment')
        killalltasks(processes_to_kill)
        run('"%s" %s' % (user_app_updater,user_silent_args_uninst))
    if isdir(user_app_dir):
        remove_tree(user_app_dir)
    if isfile(user_app_progdata_path):
        print('Uninstalling Microsoft Teams from user ProgramData environment')
        killalltasks(processes_to_kill)
        run('"%s" %s' % (user_app_progdata_updater,user_silent_args_uninst))
    if isdir(user_app_progdata_dir):
        killalltasks(processes_to_kill)
        remove_tree(user_app_progdata_dir)

    if reg_value_exists(HKEY_CURRENT_USER,r'Software\Microsoft\Office\Teams','PreventInstallationFromMsi'):
        registry_delete(HKEY_CURRENT_USER,r'Software\Microsoft\Office\Teams','PreventInstallationFromMsi')

    # suppression autoremplissage uid (modif PB)
    if not reg_value_exists(HKEY_CURRENT_USER,r'Software\Microsoft\Office\Teams','SkipUpnPrefill'):
        registry_set(HKEY_CURRENT_USER,r'Software\Microsoft\Office\Teams','SkipUpnPrefill',1,type=REG_DWORD)

    # nettoyage profil teams utilisateur (un peu violent mais le nettoyage du cache ne suffisant pas...)
    if isdir(user_conf_dir):
        killalltasks(processes_to_kill)
        time.sleep(15)
        remove_tree(user_conf_dir)

    # 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']['registerAsIMProvider'] = False
    json_config_content['appPreferenceSettings']['openAsHidden'] = True
    json_config_content['appPreferenceSettings']['runningOnClose'] = True
    json_config_content['openAtLogin'] = False
    json_config_content['isForeground'] = True
    json_config_content['wamFallbackInProgress'] = False
    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['initializedSettings']['tenantRegionInTelemetryEnabled'] = False
    json_settings_content['preauthSettings']['tenantRegionInTelemetryEnabled'] = False
    json_settings_content['preauthSettings']['samplingRules']['tenantRegionInTelemetryEnabled'] = False """
    # Other part
    json_settings_content['baseSettings']['enableRegisterProtocolToRoot'] = False
    """ json_settings_content['preauthSettings']['registerAddinOnMeetingPolicySettingsSync'] = False """

    write_json(json_settings,json_settings_content)


def update_package():
    print('Download/Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    # Initializing variables
    latest_bin = bin_name_temp

    # Downloading latest binaries
    if isfile(bin_name_temp):
        remove_file(bin_name_temp)
    if not isfile(latest_bin):
        print('Downloading: ' + latest_bin)
        wget(url_dl,latest_bin,proxies=proxy)

        # Get version from file
        version_from_file = get_msi_properties(latest_bin)['ProductVersion']
        version = version_from_file
        old_latest_bin = latest_bin
        latest_bin = bin_name_string % version
        if isfile(latest_bin):
            remove_file(latest_bin)
        os.rename(old_latest_bin,latest_bin)

		# Change version of the package
        pe = PackageEntry().load_control_from_wapt('.')
        pe.version = '%s-%s'%(version,int(pe.version.split('-',1)[1])+1)
        pe.save_control_to_wapt('.')
        print('Changing version to ' + pe.version + ' in WAPT\\control')
        print('Update package done. You can now build-upload your package')
    else:
        print('This package is already up-to-date')

    # Deleting outdated binaries
    for bin_in_dir in glob.glob('*.exe') or glob.glob('*.msi') or glob.glob('*.zip'):
        if bin_in_dir != latest_bin :
            print('Outdated binary: ' + bin_in_dir + ' Deleted')
            remove_file(bin_in_dir)




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)

- Versione WAPT installata (2.1.0 Enterprise)
- Sistema operativo del server: Debian
- Sistema operativo della macchina per l'amministrazione/creazione dei pacchetti: Windows 10
Avatar utente
Gaetano
Messaggi: 169
Iscrizioni: 8 agosto 2019 - ore 10:16
Posizione: Tolosa

18 novembre 2020 - 09:01

Grazie, lo metterò alla prova =)
Avatar utente
jpele
Messaggi: 156
Registrazione: 4 marzo 2019 - 12:01
Posizione: Nantes

19 novembre 2020 - 12:03

Ciao,

aspetto il tuo feedback prima di aggiungere questo prodotto al negozio. ;)
pierre.baridon
Messaggi: 12
Registrazione: 14 nov 2020 - 10:55
Posizione: Clermont-Ferrand

26 novembre 2020 - 17:13

Buongiorno,
il test su circa cinquanta macchine ha avuto successo; ora stiamo passando alla produzione su 1700 macchine.
Cordiali saluti,
Pierre
- Versione WAPT installata (2.1.0 Enterprise)
- Sistema operativo del server: Debian
- Sistema operativo della macchina per l'amministrazione/creazione dei pacchetti: Windows 10
Avatar utente
Gaetano
Messaggi: 169
Iscrizioni: 8 agosto 2019 - ore 10:16
Posizione: Tolosa

26 novembre 2020 - 21:11

Per quanto mi riguarda, non ho problemi a risalire ;)
Avatar utente
jpele
Messaggi: 156
Registrazione: 4 marzo 2019 - 12:01
Posizione: Nantes

27 novembre 2020 - 14:55

Buongiorno,

Grazie per il tuo feedback, ho modificato il pacchetto.
Hai ricevuto feedback da utenti che hanno dovuto riconnettersi a Teams molto regolarmente, addirittura quotidianamente?
Nel caso in cui avessi effettuato una pulizia una tantum del profilo, ecco il frammento di codice.

Codice: Seleziona tutto

    # No longer Prefill UPN
    registry_set(HKEY_CURRENT_USER,r'Software\Microsoft\Office\Teams','SkipUpnPrefill',1,type=REG_DWORD)

    # Cleaning up Teams profile once
    if registry_readstring(HKEY_CURRENT_USER,r'Software\WAPT\Teams','CleanupOnce') != 'Done':
        if isdir(user_conf_dir):
            killalltasks(processes_to_kill)
            time.sleep(2)
            remove_tree(user_conf_dir)
        registry_set(HKEY_CURRENT_USER,r'Software\WAPT\Teams','CleanupOnce','Done')
Dovremo verificare che l'opzione non scompaia nel prossimo aggiornamento, ma dovrebbe andare bene ;)

Sinceramente,
Jimmy
Bloccato