Page 1 of 1

Unable to uninstall Office 2019

Published: May 6, 2022 - 3:44 PM
by Jitero
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

Re: Unable to uninstall Office 2019

Published: May 9, 2022 - 10:21
by dcardon
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

Re: Unable to uninstall Office 2019

Published: May 9, 2022 - 11:27
by Jitero
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 3975 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 3975 times

Re: Unable to uninstall Office 2019

Published: May 10, 2022 - 10:05 AM
by gaelds
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)