Détails du package smp-msoffice_2016-33_all_MUST-BE-EDITED_all.wapt
retour Revenir à la liste des packages



ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-msoffice
version           : 2016-33
architecture      : all
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : Microsoft Office 2016
depends           : 
conflicts         : 
maturity          : MUST-BE-EDITED
locale            : all
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : winword.exe,powerpnt.exe,excel.exe,mspub.exe,msaccess.exe,infopath.exe,lync.exe,onenote.exe,outlook.exe,onenotem.exe,msosync.exe,froove.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
keywords          : 
licence           : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : rR3EI+zgO3aXlMUOp78aNJhaUJFYE/ORASnj3xKlp/GuEeSkvVRkn7dqbB97cVJl4Du3khEmi8EtI1v2ASZDB9UDhE2sH4cJo9zxqQTtuyaexXjwqJlzw9TGBpLSZ82zKrD0kDOxe0rRyjSpI2NoGi1WS6dlMu1IKFEJ27AyObLS7ITXE+911yZ2hspADW5/Lz/HQeL+vYoqbju0Zhk9m+eKD+e8ADHQ5Q7KZ7jfdSxf5hOusZMfCNDLHp0Cu+vrfJTu6KiKbZXO8y2CUVzL9Cj8W2lRFrvMKSy0KaaMtzDuMgyPyRFBcZtzHj8eLDxh8/DKUBYwm1z+f5WT0Wvtgw==
signature_date    : 20180915-092800
signed_attributes : package,version,architecture,section,priority,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,keywords,licence,signer,signer_fingerprint,signature_date,signed_attributes






Fichier setup.py :

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []
softname = 'Microsoft Office Professionnel Plus 2016'
pathosppvbs32 = makepath(programfiles32,'Microsoft Office','Office16','OSPP.VBS')
pathosppvbs64 = makepath(programfiles64,'Microsoft Office','Office16','OSPP.VBS')

def install():

    def killsoft():
      for soft in ('WINWORD.EXE','POWERPNT.EXE','EXCEL.exe','MSPUB.EXE','MSACCESS.EXE','INFOPATH.EXE','lync.exe','ONENOTE.EXE','OUTLOOK.EXE','ONENOTEM.EXE','MSOSYNC.EXE','GROOVE.EXE'):
        if isrunning(soft):
           print ("closing %s" % soft)
           killalltasks(soft)


    if not installed_softwares(softname):
        print('Installing Office 2016')
        cmd = '"setup.exe" /adminfile "silent.msp"'
    else:
        print('Repair and add component to ' + softname)
        cmd = 'msiexec.exe /p silent.msp'

    killsoft()
    run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
    if not installed_softwares(softname):
        error(' %s has been installed but the uninstall key can not be found' % softname)

    #Activation
    if isfile(pathosppvbs32):
        pathosppvbs = pathosppvbs32
    if isfile(pathosppvbs64):
        pathosppvbs = pathosppvbs64

    if 'ERROR' in run('cscript "%s" /dstatus'  % pathosppvbs):
        print("Running activation of " + softname)
        resultact = run('cscript "%s" /act' % pathosppvbs)

        if 'ERROR' in run('cscript "%s" /dstatus'  % pathosppvbs):
            error('Activation did not work : ' + resultact)
    else:
        print('Already activated Product')


def uninstall():
    open(makepath(programfiles32,'silent.xml'), "w" ).write(silentxml)
    run('"%s" /uninstall ProPlus /config "%s"' % (makepath(programfiles32,'Common Files','microsoft shared','OFFICE16','Office Setup Controller','Setup.exe'),makepath(programfiles32,'silent.xml')),timeout=1200)
    remove_file(makepath(programfiles32,'silent.xml'))

silentxml = ur"""<Configuration Product="ProPlus">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
   <Setting Id="SETUP_REBOOT" Value="NEVER" />
</Configuration>
"""