[SOLVED] Microsoft Office 2019 ProPlus

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
davidbkk
Messages: 24
Registration: May 15, 2020 - 08:29

May 15, 2020 - 08:55

Hello everyone,

I'm new to Wapt.

I am trying to deploy Microsoft Office 2019 ProPlus with the package model: tis-office365-proplus.
The installation test works perfectly, but the "remove" command returns this error:

Code: Select all

CRITICAL Critical error during uninstall: CalledProcessErrorOutput: Command [u'"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0'] returned non-zero exit status 1.
Output:La syntaxe du nom de fichier, de r‚pertoire ou de volume est incorrecte.
Running the uninstaller command in a cmd command prompt works perfectly.

Here is the script.py:

Code: Select all

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

# Empty package, you have to include offline downloaded files
# You can use the following tool to help creating Configuration.xml and download necessary files :
# https://github.com/YerongAI/Office-Tool
#
# You should also check for the uninstall string for uninstall_args by using : wapt-get list-registry Office

uninstallkey = ["ProPlus2019Volume - fr-fr"]

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():
    print('installing %s'.format(control.asrequirement()))

    office_installed = installed_softwares(softname)

    cmd = '"setup.exe" /configure "ProPlus2019.xml"'

    if not office_installed:
        print('Installing {}'.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))

def uninstall():
    print('Removing {}'.format(softname))
    for soft in kill_list:
        killalltasks(soft)
    run('"%s" %s' % (makepath(pgmsoffice,'Common Files','microsoft shared','ClickToRun','OfficeClickToRun.exe'),uninstall_args),timeout=1200)
Do you have any idea how to accomplish this?

Code: Select all

uninstallstring='"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=ProPlus2019Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0 DisplayLevel=False'
Thank you for your help.

Wapt version: 1.8.1
OS: Debian 10
Client OS: Windows 10 x64 v.1909
Last edited by davidbkk on May 15, 2020 - 10:18, edited 1 time.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

May 15, 2020 - 09:18

Good morning

In your case, you should not add an uninstallkey, otherwise WAPT will try to uninstall using the uninstallkey ;)

Code: Select all

uninstallkey = [ ]
davidbkk
Messages: 24
Registration: May 15, 2020 - 08:29

May 15, 2020 - 10:12

Thank you very much, it works.
Locked