Unable to uninstall Office 2019

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
Jitero
Messages: 15
Registration: Apr 14, 2022 - 3:07 p.m.

May 6, 2022 - 3:44 PM

Good morning,

I'm trying to uninstall my Office 2019 package, but this error appears:

Code: Select all

2022-05-06 11:53:30,598 [waptcore WaptTaskManager 6536] CRITICAL Critical error during uninstall: CalledProcessErrorOutput: Command ['"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2019Volume.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.

Command ['"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2019Volume.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.

2022-05-06 11:53:30,957 [wapttasks WaptTaskManager 6536] CRITICAL Task error Désinstallation de hg-microsoft-office (task #9): CalledProcessErrorOutput: Command ['"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2019Volume.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.
I correctly entered the uninstallation key in my script and I didn't use the variable `uninstallkey = []`, I don't see where the problem is coming from
Installed WAPT version = 2.2.1
Server OS = Windows Server 2019
Administration/package creation machine OS = Windows 10
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

May 9, 2022 - 10:21

Hello Jitero,

having the uninstallation key allows WAPT to search for the command to run to uninstall the software. But if the command in question doesn't work, WAPT won't be able to do much about it. You'll then need to implement the `def uninstall()` function to do it properly. That said, it doesn't surprise me; C2R (Click2Run) programs are particularly poorly packaged.

So, to begin, you should try running the command line in question manually. If it doesn't work, find out why and find the correct combination.

If it works in an Administrator account but not through the agent, then test with `psexec` in a system account (see the other posts on this forum on this subject).

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
Jitero
Messages: 15
Registration: Apr 14, 2022 - 3:07 p.m.

May 9, 2022 - 11:27

dcardon wrote: May 9, 2022 - 10:21 AM Hello Jitero,

having the uninstallation key allows WAPT to search for the command to run to uninstall the software. But if the command in question doesn't work, WAPT won't be able to do much about it. You will then need to implement the `def uninstall()` function to do it properly. That said, it doesn't surprise me; C2R (Click2Run) programs are particularly poorly packaged.

So, to begin with, you should try running the command line in question manually. If it doesn't work, see why and find the right combination.

If it works in an Administrator account but not through the agent, then test with `psexec` in a system account (see the other posts on this forum on this subject).

Regards,

Denis
Hello Denis,

I tried several methods to uninstall it by implementing the def uninstall() function
test333.PNG
test333.PNG (28.11 KB) Viewed 3977 times
But the same mistake keeps happening
I cannot find the error using the command line because when I launch the command via cmd I receive no feedback even though the uninstallation of Office 2019 does not run.
test333.PNG
test333.PNG (8.62 KB) Viewed 3977 times
Installed WAPT version = 2.2.1
Server OS = Windows Server 2019
Administration/package creation machine OS = Windows 10
Gaelds
Messages: 254
Registration: Nov 22, 2015 - 08:37

May 10, 2022 - 10:05

Here is the uninstall function that works for us:

Code: Select all

def uninstall():
    # Initializing variables
    app_uninstaller = r'C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe'
    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'

    killalltasks(kill_list)
    run(r'"%s" %s' % (app_uninstaller, uninstall_args), timeout=3600)
Locked