tis-msoffice 2016-42

  • package : tis-msoffice
  • version : 2016-42
  • architecture : all
  • locale : all
  • description : Microsoft Office 2016
  • maintainer : Simon Fonteneau
  • date : 2018-09-17 14:57:31
  • min_wapt_version :
  • min_os_version :
  • max_os_version :
  • 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

setup.py

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

uninstallkey = []
softname = 'Microsoft Office Professionnel Plus 2016'
pgmsoffice = programfiles32

"""
Copy the content of MSOFFICE iso in c:\waptdev\my-msoffice-wapt\

Create silent.msp with "c:\waptdev\my-msoffice-wapt\setup.exe /admin"  command

Be sure to specify an install property called SETUP_REBOOT with value NEVER
"""

def install():

    killalltasks(['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 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'

    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
    pathosppvbs32 = makepath(pgmsoffice,'Microsoft Office','Office16','OSPP.VBS')
    if 'ERROR' in run('cscript "%s" /dstatus'  % pathosppvbs32):
        print("Running activation of " + softname)
        resultact = run('cscript "%s" /act' % pathosppvbs32)

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


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

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

Changelog

No changelog
    

manifest.sha256

setup.py 47e6fc669b2be0a8dceafce5181b06b102a6e5e4b1f4f87693fac3d7bf917fcf
WAPT/certificate.crt 79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4
WAPT/icon.png 9cfcd73fdd2c7f9b158e472971b6e07116eeda00d1967f2c24847798b2bffcda
WAPT/control d1c692009eb53992e7b6495fd87bff8836f66346c8d2422553c5737161833ec2
WAPT/wapt.psproj e306ae088b4ffc91364d6f53a3933bffa75f4bc4f8a3d6ff422209e90760feb0