office 2016

Questions about WAPT Packaging / Requêtes et aides autour des paquets Wapt.
Règles du forum
Règles du forum communautaire
* English support on www.reddit.com/r/wapt
* Le support communautaire en français se fait sur ce forum
* Merci de préfixer le titre du topic par [RESOLU] s'il est résolu.
* Merci de ne pas modifier un topic qui est taggé [RESOLU]. Ouvrez un nouveau topic en référençant l'ancien
* Préciser version de WAPT installée, version complète ET numéro de build (2.2.1.11957 / 2.2.2.12337 / etc.) AINSI QUE l'édition Enterprise / Discovery
* Les versions 1.8.2 et antérieures ne sont plus maintenues. Les seules questions acceptées vis à vis de la version 1.8.2 sont liés à la mise à jour vers une version supportée (2.1, 2.2, etc.)
* Préciser OS du serveur (Linux / Windows) et version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019)
* Préciser OS de la machine d'administration/création des paquets et de la machine avec l'agent qui pose problème le cas échéant (Windows 7 / 10 / 11 / Debian 11 / etc.)
* Eviter de poser plusieurs questions lors de l'ouverture de topic, sinon il risque d'être ignorer. Si plusieurs sujet, ouvrir plusieurs topic, et de préférence les uns après les autres et pas tous en même temps (ie ne pas spammer le forum).
* Inclure directement les morceaux de code, les captures d'écran et autres images directement dans le post. Les liens vers les pastebin, les bitly et autres sites tierces seront systématiquement supprimés.
* Comme tout forum communautaire, le support est fait bénévolement par les membres. Si vous avez besoin d'un support commercial, vous pouvez contacter le service commercial Tranquil IT au 02.40.97.57.55
waptoffice
Messages : 4
Inscription : 19 mai 2017 - 14:30

19 mai 2017 - 14:44

i am having trouble creating office pro plus 2016 package. I have followed the instructions on reseaux85 :

- copy office CD to folder
- run setup.exe /admin within office folder
- create template "wapt-get make-template setup.exe"
- i replace contents of setup.py from newly created wapt-package folder
- i copy contents of office folder to root of wapt-package folder
- build and upload: " Wapt-get build-upload <wapt-package folder>"

when i add it to a host, it fails everytime with a not very helpful :

"error during install of <package>: errors in packages <package>"

can you provide some help? thank you


setup.py:

Code : Tout sélectionner

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

uninstallkey = []

def install():




    def uninstall_office_modules():
        print('Suppression des anciens modules office..')
        check_installed_soft = installed_softwares('Microsoft Office System')
        if check_installed_soft:
            for uninstall in check_installed_soft:
                key=uninstall['key']
                if installed_softwares(uninstallkey=key):
                    cmd = WAPT.uninstall_cmd(uninstall['key'])
                    run(cmd)

    def uninstall_office365():
        print('Suppression Office 365')
        check_installed_soft = installed_softwares('office 365')
        if check_installed_soft:
            for uninstall in check_installed_soft:
                key=uninstall['key']
                if installed_softwares(uninstallkey=key):
                    cmd = WAPT.uninstall_cmd(uninstall['key'])
                    run(cmd)


    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)
    softname = 'Microsoft Office Professionnel Plus 2016'
    check_installed_out = installed_softwares(softname)

    print('installing Office 2016')
    if not check_installed_out:
            cmd = '"setup.exe" /adminfile "silent.msp"'
    else:
            cmd = 'msiexec.exe /p silent.msp'
    killsoft()
    uninstall_office_modules()
    uninstall_office365()
    run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
    check_installed_out = installed_softwares(softname)
    if not check_installed_out:
        error('End audit did not find the software.')

def uninstall():
    fichier = open("%s\silent.xml" % programfiles32, "w" )
    fichier.write('<Configuration Product="ProPlus"> \n')
    fichier.write('<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" /> \n')
    fichier.write('   <Setting Id="SETUP_REBOOT" Value="NEVER" /> \n')
    fichier.write('</Configuration> \n')
    fichier.close()
    run('"%s\Common Files\microsoft shared\OFFICE16\Office Setup Controller\Setup.exe" /uninstall ProPlus /config "%s\silent.xml"' % (programfiles32,programfiles32),timeout=1200)
    remove_file(r'%s\silent.xml'% programfiles32)
    
Avatar de l’utilisateur
agauvrit
Expert WAPT
Messages : 238
Inscription : 17 nov. 2016 - 10:25
Localisation : Nantes
Contact :

19 mai 2017 - 15:47

Hi,

Are you using PyScripter for package development ?
Are you deploying Microsoft Office Professionnel Plus 2016 ? Standard ?

PyScripter is available in package bundle tis-waptdev, you'll be able to debug your package and have a better feedback.

Your source code seems fine, please try to launch the install function using PyScripter and maybe you'll have an explicit error code.

Alexandre
waptoffice
Messages : 4
Inscription : 19 mai 2017 - 14:30

23 mai 2017 - 09:27

i have downloaded the package and imported to my wapt server/repository

(by the way, when i try to "import from internet" it fails with :

Code : Tout sélectionner

download canceled.: "" is an invalid integer
)

after i add it to the client, it says:

Code : Tout sélectionner

result: {"skipped": [["waptdev....
after the install of office package still fails
Avatar de l’utilisateur
sfonteneau
Expert WAPT
Messages : 1788
Inscription : 10 juil. 2014 - 23:52
Contact :

23 mai 2017 - 14:04

waptoffice a écrit :i have downloaded the package and imported to my wapt server/repository

(by the way, when i try to "import from internet" it fails with :

Code : Tout sélectionner

download canceled.: "" is an invalid integer
This error message often appears when the proxy in the console is incorrectly configured

https://www.wapt.fr/en/doc/Utilisation/ ... et-basique
waptoffice a écrit : )

after i add it to the client, it says:

Code : Tout sélectionner

result: {"skipped": [["waptdev....
This means that the waptdev package is already installed!
waptoffice a écrit : after the install of office package still fails
Can you give us the error of the package office ?

In the console, click on the computer, in the right part click on the package in error.
https://www.wapt.fr/en/doc/Utilisation/ ... et-general
waptoffice
Messages : 4
Inscription : 19 mai 2017 - 14:30

23 mai 2017 - 14:29

thank you for your help, i see it installed ;)

the error for office is:

installing office 2016
Suppression des anciens modules office
suppression office 265
CalledProcessError: Command
'("setup.exe /adminfile "silent.msp"",)' returned non-zero exit status 30059

i see this is related to office license key? ill check it again, im sure its correct.
waptoffice
Messages : 4
Inscription : 19 mai 2017 - 14:30

24 mai 2017 - 10:44

i removed the key from the silent.msp and it works perfectly now

thank you
Verrouillé