Office 2019 package

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
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

October 30, 2020 - 10:20

Good morning,
I used the example of the package for Office 2019 which seemed to work here:
viewtopic.php?f=9&t=2407&p=7967&hilit=office+2019#p7967
but I'm still getting the error:
CalledProcessErrorOutput: Command '"setup.exe" /configure "configuration-office2019.xml"' returned non-zero exit status -2146994714.

Here is my setup.py:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
# You should also check for the uninstall string for uninstall_args by using : wapt-get list-registry Office

uninstallkey = []

# raccourcis
RaccourcisDossierProgramm1 = makepath(programfiles32,"Microsoft Office","root","Office16")

softname = "Microsoft Office Professional Plus 2019 - fr-fr"
pgmsoffice = programfiles
uninstall_args = r'scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0 DisplayLevel=False'

kill_list = ['winword.exe','powerpnt.exe','excel.exe','mspub.exe','msaccess.exe','infopath.exe','lync.exe','onenote.exe','outlook.exe','onenotem.exe','msosync.exe','groove.exe','OfficeClicktoRun.exe']

def install():
    office_installed = installed_softwares(softname)
    cmd = '"setup.exe" /configure "configuration-office2019.xml"'

    if not office_installed:
        print('Installation de {}'.format(softname))
        run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
    else:
        if Version(office_installed[0]['version']) < Version(control.version.split('-',1)[0]):
            run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
        else:
            print('{} already up to date or newer : {}'.format(softname,office_installed[0]['version']))

    if not installed_softwares(softname):
        error(' {} has been installed but the uninstall key can not be found'.format(softname))

    print('Copie des fichiers de desinstallation uninstall-all.XML et setup.exe')
    copytree2(r"uninstall",(RaccourcisDossierProgramm1))

def uninstall():
    print('Removing {}'.format(softname))
    for soft in kill_list:
        killalltasks(soft)

    uninstallcmd = r'"C:\Program Files (x86)\Microsoft Office\root\Office16\setup.exe" /configure "C:\Program Files (x86)\Microsoft Office\root\Office16\uninstall-all.xml"'
    print('desinstallation de Microsoft Office')
    run(uninstallcmd,timeout=1800,accept_returncodes=[1641,3010,0])
    print('fin de uninstall')
And the configuration-office2019.xml file:

Code: Select all

<Configuration>
  <Add OfficeClientEdition="64" Channel="PerpetualVL2019" SourcePath="\\172.16.10.3\Logiciels\Office2019\" AllowCdnFallback="TRUE">
    <Product ID="ProPlus2019Volume" PIDKEY="xxxxxxxxxxxxxxxxxxxxx">
      <Language ID="fr-fr" />
      <ExcludeApp ID="Groove" />
      <ExcludeApp ID="OneDrive" />
      <ExcludeApp ID="Outlook" />
    </Product>
    <Product ID="LanguagePack">
      <Language ID="fr-fr" />
      <ExcludeApp ID="Groove" />
      <ExcludeApp ID="OneDrive" />
      <ExcludeApp ID="Outlook" />
    </Product>
    <Product ID="ProofingTools">
      <Language ID="fr-fr" />
	  <Language ID="de-de" />
      <Language ID="en-us" />
	  <Language ID="es-ES" />
    </Product>
  </Add>
  <Property Name="SharedComputerLicensing" Value="0" />
  <Property Name="PinIconsToTaskbar" Value="FALSE" />
  <Property Name="SCLCacheOverride" Value="0" />
  <Property Name="AUTOACTIVATE" Value="1" />
  <Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />
  <Property Name="DeviceBasedLicensing" Value="0" />
  <Updates Enabled="TRUE" UpdatePath="\\172.16.10.3\Logiciels\Office2019\Updates\" />
  <AppSettings>
    <Setup Name="Company" Value="XXX" />
    <User Key="software\microsoft\office\16.0\common\toolbars" Name="screentipscheme" Value="2" Type="REG_DWORD" App="office16" Id="L_ShowScreenTips" />
    <User Key="software\microsoft\office\16.0\excel\options" Name="defaultformat" Value="51" Type="REG_DWORD" App="excel16" Id="L_SaveExcelfilesas" />
    <User Key="software\microsoft\office\16.0\powerpoint\options" Name="defaultformat" Value="27" Type="REG_DWORD" App="ppt16" Id="L_SavePowerPointfilesas" />
    <User Key="software\microsoft\office\16.0\word\options" Name="defaultformat" Value="" Type="REG_SZ" App="word16" Id="L_SaveWordfilesas" />
  </AppSettings>
  <Display Level="None" AcceptEULA="TRUE" /> 
  <Logging Level="Off" />
</Configuration>
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

October 30, 2020 - 11:29

The following command, run manually, works on the machines:
\\172.16.10.3\Logiciels\Office2019\setup.exe /configure \\172.16.10.3\Logiciels\Office2019\configuration-office2019.xml.


So I suspect the system account used by wapt might not have access to the network share... Therefore, the "SourcePath" in the configuration XML file needs to be changed, but I've tried "./office", "office", and ".\office". Nothing works.
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 6, 2020 - 11:49

I still don't see a solution. The command launched from the network share works:
"\\172.16.10.3\logiciels\Office2019\setup.exe /configure /configuration-office2019.xml" installs Office correctly.
But when setup.exe and the configuration-office2019.xml file are copied locally, it doesn't work.
"C:\temp\setup.exe /configure /configuration-office2019.xml"
displays error 30088-1021 (0).
I imagine it's the same error that prevents installation via the package.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

November 6, 2020 - 12:06 PM

This forum and the WAPT documentation clearly state that accessing network shares for package installation is strongly discouraged. The installation doesn't necessarily occur when the machine has network access, and more specifically, access to the server in question (machine connected via Wi-Fi, 802.1x, VPN), or the connection credentials might not match (the WAPT agent runs on LocalSystem, which isn't always well integrated). It's much better to include the executable files in the package (or create two separate packages if it's a real problem, for example, if you frequently change the installation parameters).
Regards,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 9, 2020 - 2:36 PM

OK, thanks for the reply! But could you tell me what to put for SourcePath? I've tried adding the "office" folder containing the installation files to the package, and using SourcePath="office", SourcePath="./office", and SourcePath=".\office", but nothing works...
TeoMrbl
Messages: 1
Registration: Nov 20, 2020 - 09:09

November 20, 2020 - 09:21

Hello,


I'm reviving this thread.
Has there been any progress on this package? I'm currently experiencing the same issue as you.

Looking forward to your reply,


Best regards,

Have a good day!
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 23, 2020 - 10:33

I just managed to install the package on one machine using the command "wapt-get install --direct -ldebug". Office installed correctly, but the installation window was visible despite the instruction `Display Level="NONE"` in the "configuration-office2019.xml" file

Code: Select all

<Configuration>
  <Add OfficeClientEdition="64" Channel="PerpetualVL2019" SourcePath="Office" AllowCdnFallback="TRUE">
    <Product ID="ProPlus2019Volume" PIDKEY="XXXXXXXXXXXXXXXXXXXXXXXXXXX">
      <Language ID="fr-fr" />
      <ExcludeApp ID="OneDrive" />
      <ExcludeApp ID="Outlook" />
    </Product>
    <Product ID="LanguagePack">
      <Language ID="fr-fr" />
      <ExcludeApp ID="OneDrive" />
      <ExcludeApp ID="Outlook" />
    </Product>
    <Product ID="ProofingTools">
      <Language ID="fr-fr" />
	  <Language ID="de-de" />
      <Language ID="en-us" />
	  <Language ID="es-ES" />
    </Product>
  </Add>
  <Property Name="SharedComputerLicensing" Value="0" />
  <Property Name="PinIconsToTaskbar" Value="FALSE" />
  <Property Name="SCLCacheOverride" Value="0" />
  <Property Name="AUTOACTIVATE" Value="1" />
  <Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />
  <Property Name="DeviceBasedLicensing" Value="0" />
  <Updates Enabled="TRUE" UpdatePath="Updates" />
  <AppSettings>
    <Setup Name="Company" Value="DOM SORTAIS" />
    <User Key="software\microsoft\office\16.0\common\toolbars" Name="screentipscheme" Value="2" Type="REG_DWORD" App="office16" Id="L_ShowScreenTips" />
    <User Key="software\microsoft\office\16.0\excel\options" Name="defaultformat" Value="51" Type="REG_DWORD" App="excel16" Id="L_SaveExcelfilesas" />
    <User Key="software\microsoft\office\16.0\powerpoint\options" Name="defaultformat" Value="27" Type="REG_DWORD" App="ppt16" Id="L_SavePowerPointfilesas" />
    <User Key="software\microsoft\office\16.0\word\options" Name="defaultformat" Value="" Type="REG_SZ" App="word16" Id="L_SaveWordfilesas" />
  </AppSettings>
  <Display Level="NONE" AcceptEULA="TRUE" /> 
  <Logging Level="Off" />
</Configuration>
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

November 23, 2020 - 1:50 PM

And here are the logs when I do a simple "wapt-get install dst-microsoft-office"
Installing dst-microsoft-office(=16.0.13231.20350-22)
Removing the office application from win10 from
Installing Microsoft Office Professional Plus 2019 - fr-fr
2020-11-23 14:56:52,713 CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command '"c:\\users\\adm\\appdata\\local\\temp\\waptg1exkt\\setup.exe" /configure "./configuration-office2019.xml"' returned non-zero exit status -2147418113.
Output::
Traceback (most recent call last):
File "C:\wapt\common.py", line 3876, in install_wapt
exitstatus = setup.install()
File "c:\users\adm\appdata\local\temp\waptg1exkt\setup.py", line 24, in install
run(cmd,timeout=1200,accept_returncodes=[1641,3010,0])
File "C:\wapt\common.py", line 3646, in run
return ensure_unicode(setuphelpers.run(*arg,**args))
File "C:\wapt\setuphelpers_windows.py", line 3716, in run
raise CalledProcessErrorOutput(proc.returncode,cmd,''.join(output))
CalledProcessErrorOutput: Command '"c:\\users\\adm\\appdata\\local\\temp\\waptg1exkt\\setup.exe" /configure "./configuration-office2019.xml"' returned non-zero exit status -2147418113.
Output:

2020-11-23 14:56:53,641 CRITICAL Package dst-microsoft-office [x64_fr_PROD] not installed due to errors: CalledProcessErrorOutput: Command '"c:\\users\\adm\\appdata\\local\\temp\\waptg1exkt\\setup.exe" /configure "./configuration-office2019.xml"' returned non-zero exit status -2147418113.
Output:

florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

March 3, 2021 - 4:23 PM

Having also struggled with this same problem, the very simple solution that worked for me was to empty the SourcePath like this:

Code: Select all

SourcePath=""
Locked