Page 1 sur 1

office 2016

Posté : 19 mai 2017 - 14:44
par waptoffice
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)
    

Re: office 2016

Posté : 19 mai 2017 - 15:47
par agauvrit
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

Re: office 2016

Posté : 23 mai 2017 - 09:27
par waptoffice
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

Re: office 2016

Posté : 23 mai 2017 - 14:04
par sfonteneau
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

Re: office 2016

Posté : 23 mai 2017 - 14:29
par waptoffice
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.

Re: office 2016

Posté : 24 mai 2017 - 10:44
par waptoffice
i removed the key from the silent.msp and it works perfectly now

thank you