[Wapt] désinstaller Office 2016 et installer la version 2019 puis MS Projetc

David Matta sysadmin at lfib.ac.th
Mar 11 Mai 11:16:30 CEST 2021


Bonjour,



Le store wapt contient déjà le paquet MS Office 2016 avec une fonction
d’uninstall.

En Pj mon paquet qui me sert à déployer MS Office 2019 Pro Plus.



Je mets les sources directement dans le paquet, à toi de voir si tu
préfères un partage réseau.



La configuration du *.xml peut se faire via ce guide ainsi que la
désinstallation des versions antérieures à 2019 :

https://docs.microsoft.com/en-us/deployoffice/office2019/deploy#sample-configurationxml-file-to-use-with-the-office-deployment-tool



MS Project est simplement l’ajout d’une ligne dans le *.xml pour qu’il soit
installé.



Bien mettre la clé GVLK dans le XML dans le cas d’une archi d’activation
KMS.



Cordialement.



David.

*De :* WAPT <wapt-bounces at lists.tranquil.it> *De la part de* Moha AHBAR
*Envoyé :* mardi 11 mai 2021 14:35
*À :* wapt at lists.tranquil.it
*Objet :* [Wapt] désinstaller Office 2016 et installer la version 2019 puis
MS Projetc



Bonjour à toutes et à tous,

Auriez-vous le ou les paquets nécessaires pour désinstaller Office 2016 et
installer la version 2019 puis MS Projetc.

Sachant que pour l'installation de  office 2019 se fait via un install.bat
qui lance un .xml pour télécharger office 2019.

Merci pour toutes info et bonne journée,

m.
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20210511/0cf3a0f1/attachment.htm>
-------------- section suivante --------------
# -*- coding: utf-8 -*-
from setuphelpers import *

# Empty package, you have to include offline downloaded files
# You can use the following tool to help creating Configuration.xml and download necessary files :
# https://github.com/YerongAI/Office-Tool
#
# You should also check for the uninstall string for uninstall_args by using : wapt-get list-registry Office

uninstallkey = [ ]

softname = "Microsoft Office Professional Plus 2019 - fr-fr"
pgmsoffice = programfiles
uninstall_args = r'scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0 DisplayLevel=False'

kill_list = ['winword.exe','powerpnt.exe','excel.exe','mspub.exe','msaccess.exe','infopath.exe','lync.exe','onenote.exe','outlook.exe','onenotem.exe','msosync.exe','groove.exe','OfficeClicktoRun.exe']

def install():
    print('installing %s'.format(control.asrequirement()))

    office_installed = installed_softwares(softname)

    cmd = '"setup.exe" /configure "ProPlus2019.xml"'

    if not office_installed:
        print('Installing {}'.format(softname))
        run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
    else:
        if Version(office_installed[0]['version']) < Version(control.version.split('-',1)[0]):
            run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
        else:
            print('{} already up to date or newer : {}'.format(softname,office_installed[0]['version']))

    if not installed_softwares(softname):
        error(' {} has been installed but the uninstall key can not be found'.format(softname))

def uninstall():
    print('Removing {}'.format(softname))
    for soft in kill_list:
        killalltasks(soft)
    run('"%s" %s' % (makepath(pgmsoffice,'Common Files','microsoft shared','ClickToRun','OfficeClickToRun.exe'),uninstall_args),timeout=1200)


Plus d'informations sur la liste de diffusion WAPT