Office 2016

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
waptoffice
Messages: 4
Registration: May 19, 2017 - 2:30 p.m.

May 19, 2017 - 2:44 PM

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)
    
User avatar
agauvrit
WAPT Expert
Messages: 238
Registration: Nov 17, 2016 - 10:25
Location: Nantes
Contact :

May 19, 2017 - 3:47 PM

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
waptoffice
Messages: 4
Registration: May 19, 2017 - 2:30 p.m.

May 23, 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: 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
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

May 23, 2017 - 2:04 PM

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
waptoffice
Messages: 4
Registration: May 19, 2017 - 2:30 p.m.

May 23, 2017 - 2:29 PM

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.
waptoffice
Messages: 4
Registration: May 19, 2017 - 2:30 p.m.

May 24, 2017 - 10:44

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

thank you
Locked