Page 1 of 1

Office 2016

Published: May 19, 2017 - 2:44 PM
by 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 every time with a not very helpful:

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

can you provide some help? thank you


setup.py:

Code: Select all

# -*- 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

Published: May 19, 2017 - 3:47 PM
by agauvrit
Hi,

Are you using PyScripter for package development?
Are you deploying Microsoft Office Professional 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.

Alexander

Re: Office 2016

Published: May 23, 2017 - 09:27
by 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: Select all

download canceled.: "" is an invalid integer
)

after i add it to the client, it says:

Code: Select all

result: {"skipped": [["waptdev....
after the install of office package still fails

Re: Office 2016

Published: May 23, 2017 - 2:04 PM
by sfonteneau
waptoffice wrote: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: Select all

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 wrote: )

after i add it to the client, it says:

Code: Select all

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

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

Published: May 23, 2017 - 2:29 PM
by waptoffice
thank you for your help, i see it installed ;)

the error for office is:

installing office 2016
Removing old office modules
deletion 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

Published: May 24, 2017 - 10:44
by waptoffice
i removed the key from the silent.msp and it works perfectly now

thank you