Je suis nouveau sur Wapt.
J'essaye de déployer Microsoft Office 2019 ProPlus avec le modèle du paquet : tis-office365-proplus.
Le test d'installation fonctionne parfaitement mais le "remove" renvoi cette erreur :
Code : Tout sélectionner
CRITICAL Critical error during uninstall: CalledProcessErrorOutput: Command [u'"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0'] returned non-zero exit status 1.
Output:La syntaxe du nom de fichier, de r‚pertoire ou de volume est incorrecte.
Voici le script.py:
Code : Tout sélectionner
# -*- 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 = ["ProPlus2019Volume - fr-fr"]
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)
Code : Tout sélectionner
uninstallstring='"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0 DisplayLevel=False'
Version de Wapt: 1.8.1
OS : Debian 10
OS client: Windows 10 x64 v.1909