[SOLVED] Uninstalling the microsoft-office-2024-professional 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
lfkl
Messages: 23
Registration: Apr 11, 2019 - 05:51

November 13, 2024 - 03:47

Hello everyone,

In the Microsoft Office Professional 2024 package, we've added English language support and spell-checking tools to the configuration XML for ProPlus, Visio, and Project! No installation problems.
<Configuration ID="f884adcc-fd71-4b09-b91f-fXXXXXXXXXX">
<Add OfficeClientEdition="64" Channel="PerpetualVL2024">
<Product ID="ProPlus2024Volume" PIDKEY="XJ2XN-FW8RK-XXXXX-XXXXX-XXXXX">
<Language ID="fr-fr" />
<Language ID="en-us" />
</Product>
<Product ID="VisioPro2024Volume">
<Language ID="fr-fr" />
<Language ID="en-us" />
</Product>
<Product ID="ProjectPro2024Volume">
<Language ID="fr-fr" />
<Language ID="en-us" />
</Product>
<Product ID="LanguagePack">
<Language ID="fr-fr" />
<Language ID="en-us" />
</Product>
<Product ID="ProofingTools">
<Language ID="en-us" />
<Language ID="fr-fr" />
</Product>
Regarding uninstallation, it's my understanding that the original package from the Wapt Store only includes the French version of "ProPlus2024Volume" (which is perfectly normal) with an uninstallation condition based on `app_uninstallkey = "ProPlus2024Volume - fr-fr"`. Although I haven't tried it, I imagine it uninstalls based on this condition?

My question is, how do I uninstall my package along with all languages, tools, and versions? Do I add different `app_uninstallkey` values ​​based on the output of the `wapt-get list-registry` command?
For example: app_uninstallkey = "ProPlus2024Volume*", "ProjectPro2024Volume*" (I'm not sure about my syntax).
Or is there an easier way?

Thank you for your help and time. Sincerely,
Ramses
jcgensam
Messages: 11
Registration: March 24, 2025 - 4:39 PM

September 17, 2025 - 6:15 PM

Hello,

I'm reviving this thread because I have the same question. :-)

Uninstalling the "official" package provided by Tranquil IT leaves the Office 2024 suite partially installed (it still contains "Microsoft Office LTSC Standard 2024 - en-us").

Will a multi-valued app_uninstallkey work? :

app_uninstallkey = ["Standard2024Volume - fr-fr", "Microsoft Office LTSC Standard 2024 - en-us"]

Regards,

JCG
jlepiquet
Messages: 69
Registration: Sep 3, 2024 - 4:09 p.m.

September 18, 2025 - 11:04

Good morning,

We should add an uninstallation function with all the keys for the software you wish to uninstall.
Based on the uninstallation key:

Code: Select all

def uninstall():

uninstall_keys = ["Standard2024Volume - fr-fr", "Microsoft Office LTSC Standard 2024 - en-us"]

for uninstall_key in uninstall_keys:
    for to_uninstall in installed_softwares(uninstall_key):
        print(f"Removing: {to_uninstall['name']} ({to_uninstall['version']})")
        killalltasks(ensure_list(control.impacted_process))
        run(uninstall_cmd(to_uninstall["key"]))
        wait_uninstallkey_absent(to_uninstall["key"])
Or, based on the software name, this allows us to add an asterisk (*) for greater generality:

Code: Select all

def uninstall():

uninstall_names = ["Standard2024Volume*", "Microsoft Office LTSC Standard 2024*"]

for uninstall_name in uninstall_names:
    for to_uninstall in installed_softwares(name=f"{uninstall_name}"):
        print(f"Removing: {to_uninstall['name']} ({to_uninstall['version']})")
        killalltasks(ensure_list(control.impacted_process))
        run(uninstall_cmd(to_uninstall["key"]))
        wait_uninstallkey_absent(to_uninstall["key"])
jcgensam
Messages: 11
Registration: March 24, 2025 - 4:39 PM

September 18, 2025 - 4:51 PM

Thank you for your invaluable help!

Indeed, by adding the uninstall function, most of the additional components are removed. Only one remains stubborn: Microsoft Office LTSC Standard 2024 - en-us!

Wapt returns the following error, which was generated by the uninstallation:

Code: Select all

2025-09-18 16:41:28,939 CRITICAL Error running uninstall script: Command ['"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2024Volume.16_en-us_x-none culture=en-us 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.
However, OfficeClickToRun.exe is indeed present in the correct directory structure, and the command syntax seems correct?
jlepiquet
Messages: 69
Registration: Sep 3, 2024 - 4:09 p.m.

September 22, 2025 - 08:53

Is it possible to launch

Code: Select all

"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2024Volume.16_en-us_x-none culture=en-us version.16=16.0
Can you access a command prompt as administrator and see how the PC reacts?
jcgensam
Messages: 11
Registration: March 24, 2025 - 4:39 PM

September 22, 2025 - 12:46

Indeed, good point, I get a "Ready to uninstall?" window where I have to click "Uninstall" or "Close," so it requires interaction.

I'm looking for the silent switches in OfficeClickToRun.exe, but it's not very well documented, and /? or /h don't work.

It's funny that it works perfectly for the French version but not for the US version...
jcgensam
Messages: 11
Registration: March 24, 2025 - 4:39 PM

September 22, 2025 - 12:49

Oh wait, no, actually, for the French version I checked:

"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2024Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0

I get the same dialog box... So there's a good chance the uninstallation is happening through a different process...
jlepiquet
Messages: 69
Registration: Sep 3, 2024 - 4:09 p.m.

September 22, 2025 - 4:28 PM

We must add DisplayLevel=False at the end of the uninstallation command

"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2024Volume.16_fr-fr_x-none culture=fr-fr version.16=16.0 DisplayLevel=False

https://community.spiceworks.com/t/unin...cmd/622809

If all uninstallation commands are in this format, the code might look like this

Code: Select all

def uninstall():

uninstall_names = ["Standard2024Volume*", "Microsoft Office LTSC Standard 2024*"]

for uninstall_name in uninstall_names:
    for to_uninstall in installed_softwares(name=f"{uninstall_name}"):
        print(f"Removing: {to_uninstall['name']} ({to_uninstall['version']})")
        killalltasks(ensure_list(control.impacted_process))
        run(uninstall_cmd(to_uninstall["key"])+ " DisplayLevel=False")
        wait_uninstallkey_absent(to_uninstall["key"])
jlepiquet
Messages: 69
Registration: Sep 3, 2024 - 4:09 p.m.

September 22, 2025 - 5:05 PM

However, I believe that uninstalling Office deletes the OfficeClickToRun.exe file; it should be the last one to be uninstalled.
jcgensam
Messages: 11
Registration: March 24, 2025 - 4:39 PM

September 23, 2025 - 1:59 PM

Based on the tests I've done, as long as the en-US version of Office is not uninstalled, OfficeClickToRun.exe remains present and can be called, so that should be fine.

Moreover, when I manually launch "

Code: Select all

"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=Standard2024Volume.16_en-us_x-none culture=en-us version.16=16.0 DisplayLevel=False
", it works without any problems.

I think we're getting close with the code snippet you suggested adding, but it's returning a Python error:

Code: Select all

'Traceback (most recent call last):\n  File "<string>", line 856, in main\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5966, in remove\n    self.uninstall(package)\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 7559, in uninstall\n    entry.call_setup_hook(\'uninstall\', self, params=params,force=force)\n  File "C:\\Program Files (x86)\\wapt\\waptpackage.py", line 3008, in call_setup_hook\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\waptpackage.py", line 3004, in call_setup_hook\n    hookdata = hook_func()\n  File "<string>", line 54, in uninstall\nTypeError: can only concatenate list (not "str") to list\n')
So, I just corrected the line:

Code: Select all

run(uninstall_cmd(to_uninstall["key"]) + " DisplayLevel=False")
in

Code: Select all

run(uninstall_cmd(to_uninstall["key"])[0] + " DisplayLevel=False")
And it all works perfectly!

Thank you so much for your help, I would never have found it... Now the package is fully operational, I'm happy about that!

Sincerely,

JCG
Locked