Détails du package

smp-msoffice

retour Revenir à la liste des packages

smp-msoffice

Fichier control :

package           : smp-msoffice
version           : 2016-34
architecture      : all
section           : base
priority          : optional
name              : 
categories        : 
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    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 4a118cdc-f9e4-494a-8a4e-7f8757bd58b0
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 1e54425be03a2a3ea1a264b40d984c31f17a6a489a3b722acb993cbf6561e903
signature         : p/tSTzQ2vRgUELqAp9YO0/0CqiFE7KyZVnbGryHA1gfRCo6DQ1cMfj2v26RFicyHI6bOaxwDu5n3qdsXxd+5tTyP9+EIBhS4NbllvfLJiHel9m3A2kmgk8qsBfVnRlEZF/SRZ6XMX5aXZqNjHPXqIWVpHgXQCeeRUY8VWhRgya0hXYUgng6zZ1Z/j8iXxdxl2qbZuRT0+b1oP1KQdJ3N0R86z0XWPtjDaX7v4fDEWG0cA/bEdavglS8G6O/gtnvnXNgciEk8JEEW5t3CayYn/CP7LXYjDqXuL2FzrqUs9brFq7UBjjNQWFCDDFKjsDnrdMz6qOTx+j4AN2ubI46mNg==
signature_date    : 2020-07-04T11:15:36.924000
signed_attributes : package,version,architecture,section,priority,name,categories,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,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,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 = r"""<Configuration Product="ProPlus">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
   <Setting Id="SETUP_REBOOT" Value="NEVER" />
</Configuration>
"""