[SOLVED] Msiexe.exe uninstallation problem

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
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 10, 2021 - 2:03 PM

Hello,

Novice, I am unable to uninstall software on Windows machines. From the WAPT console (under the "Software Inventory" tab of the machine in question), the uninstallation command is indicated as "MsiExec.exe /I{23170F69-40C1-2701-1801-000001000000}". So I created a simple command:

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

def install():
print("Uninstalling the software")
run(r'MsiExec.exe /I{23170F69-40C1-2701-1801-000001000000}')
print("The software has been successfully uninstalled")


And it gives me an error and doesn't uninstall the software I requested:

ERROR:
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3923, in install_wapt
exitstatus = setup.install()
File "C:\WINDOWS\TEMP\waptzbjrrri9\setup.py", line 7, in install
File "C:\Program Files (x86)\wapt\common.py", line 3705, in run
return ensure_unicode(setuphelpers.run(*arg, **args))
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 4029, in run
raise CalledProcessErrorOutput(proc.returncode, cmd, ''.join(output))
waptutils.CalledProcessErrorOutput: Command 'MsiExec.exe /I{23170F69-40C1-2701-1801-000001000000}' returned non-zero exit status 1605.
Output:This action is valid only for tsd products Ú j Ó install Ú s .


Thank you in advance, cordially.
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

June 10, 2021 - 5:04 PM

If you run this command in a terminal on the affected PC, does it return the same error message?
If so, you can try using the /X option instead.
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 11, 2021 - 10:16

Hello,

I tried using /I (command prompt as administrator on the machine) and it displays a pop-up with the message "valid for product already installed..." as shown below. Using /X it offers me the option to uninstall via a pop-up but then displays the message "valid for product...".

Thank you in advance, sincerely.
florentR2
Messages: 100
Registration: February 13, 2020 - 5:23 PM

June 11, 2021 - 11:48

If it also happens in the command prompt, it means the product isn't installed or the uninstall command it provides is incorrect.
You'll have to figure out another way; sometimes it's a bit of a hassle.
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 11, 2021 - 2:55 PM

Thanks anyway!
elelay
Messages: 27
Registration: Oct 20, 2020 - 12:39

June 14, 2021 - 11:36

Hello Thomas,

The command you're running cannot be defined in the install() because it's an uninstallation command.
You can't uninstall software that isn't installed.

Regards,
WAPT Server version: 2.0 Enterprise
Console installed on a Windows Server 2019
Debian 10 Buster server
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

June 15, 2021 - 10:29

Hello, if the MSI is poorly designed and cannot be silent, you need to contact the publisher to fix this. Installation and uninstallation should be possible without user interaction.
It's possible to run uninstalls within the `def install()` function when you want to clean up your system (i.e., remove unwanted software installed outside of Wapt). This is a legitimate use case, but if the MSI is completely corrupted, you'll need to perform the cleanup using a script (deleting files, registry keys, etc.).
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
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 15, 2021 - 11:47

Hello, thank you for these two replies. However, it's about 7-Zip, so... I downloaded your WAPT 19.0-24 version and deployed it across the network, but some users reported errors because 7-Zip version 18.01 was already installed. So I created this uninstallation package, which apparently doesn't work. Manually uninstalling 7-Zip 18.01 seems to be the only way to resolve this issue.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

June 15, 2021 - 11:52

The package we distribute tries to remove older versions of 7-Zip before installing because some versions don't upgrade correctly. However, we haven't received any reports of versions refusing to uninstall.
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
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 15, 2021 - 2:00 PM

In my case, the 7zip 19.0-23 version from your repository doesn't seem to uninstall version 18.01, which has the uninstallation key {23170F69-40C1-2701-1801-000001000000}.
However, if this 7zip 18.01 version was installed manually on the machine (and not via WAPT), could this affect the uninstallation process you included in your 7zip 19.0-23 package?
Thank you in advance, best regards.
Locked