j'ai repris l'exemple du paquet pour office 2019 qui semblait fonctionner ici :
viewtopic.php?f=9&t=2407&p=7967&hilit=office+2019#p7967
mais j'ai toujours l'erreur :
CalledProcessErrorOutput: Command '"setup.exe" /configure "configuration-office2019.xml"' returned non-zero exit status -2146994714.
Voici mon setup.py:
Code : Tout sélectionner
# -*- coding: utf-8 -*-
from setuphelpers import *
# You should also check for the uninstall string for uninstall_args by using : wapt-get list-registry Office
uninstallkey = []
# raccourcis
RaccourcisDossierProgramm1 = makepath(programfiles32,"Microsoft Office","root","Office16")
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():
office_installed = installed_softwares(softname)
cmd = '"setup.exe" /configure "configuration-office2019.xml"'
if not office_installed:
print('Installation de {}'.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))
print('Copie des fichiers de desinstallation uninstall-all.XML et setup.exe')
copytree2(r"uninstall",(RaccourcisDossierProgramm1))
def uninstall():
print('Removing {}'.format(softname))
for soft in kill_list:
killalltasks(soft)
uninstallcmd = r'"C:\Program Files (x86)\Microsoft Office\root\Office16\setup.exe" /configure "C:\Program Files (x86)\Microsoft Office\root\Office16\uninstall-all.xml"'
print('desinstallation de Microsoft Office')
run(uninstallcmd,timeout=1800,accept_returncodes=[1641,3010,0])
print('fin de uninstall')
Code : Tout sélectionner
<Configuration>
<Add OfficeClientEdition="64" Channel="PerpetualVL2019" SourcePath="\\172.16.10.3\Logiciels\Office2019\" AllowCdnFallback="TRUE">
<Product ID="ProPlus2019Volume" PIDKEY="xxxxxxxxxxxxxxxxxxxxx">
<Language ID="fr-fr" />
<ExcludeApp ID="Groove" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="Outlook" />
</Product>
<Product ID="LanguagePack">
<Language ID="fr-fr" />
<ExcludeApp ID="Groove" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="Outlook" />
</Product>
<Product ID="ProofingTools">
<Language ID="fr-fr" />
<Language ID="de-de" />
<Language ID="en-us" />
<Language ID="es-ES" />
</Product>
</Add>
<Property Name="SharedComputerLicensing" Value="0" />
<Property Name="PinIconsToTaskbar" Value="FALSE" />
<Property Name="SCLCacheOverride" Value="0" />
<Property Name="AUTOACTIVATE" Value="1" />
<Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />
<Property Name="DeviceBasedLicensing" Value="0" />
<Updates Enabled="TRUE" UpdatePath="\\172.16.10.3\Logiciels\Office2019\Updates\" />
<AppSettings>
<Setup Name="Company" Value="XXX" />
<User Key="software\microsoft\office\16.0\common\toolbars" Name="screentipscheme" Value="2" Type="REG_DWORD" App="office16" Id="L_ShowScreenTips" />
<User Key="software\microsoft\office\16.0\excel\options" Name="defaultformat" Value="51" Type="REG_DWORD" App="excel16" Id="L_SaveExcelfilesas" />
<User Key="software\microsoft\office\16.0\powerpoint\options" Name="defaultformat" Value="27" Type="REG_DWORD" App="ppt16" Id="L_SavePowerPointfilesas" />
<User Key="software\microsoft\office\16.0\word\options" Name="defaultformat" Value="" Type="REG_SZ" App="word16" Id="L_SaveWordfilesas" />
</AppSettings>
<Display Level="None" AcceptEULA="TRUE" />
<Logging Level="Off" />
</Configuration>