Page 1 of 1

[SOLVED] Msiexe.exe uninstallation problem

Published: June 10, 2021 - 2:03 PM
by thomas789
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.

Re: Problem uninstalling Msiexe.exe

Published: June 10, 2021 - 5:04 PM
by florentR2
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.

Re: Problem uninstalling Msiexe.exe

Published: June 11, 2021 - 10:16
by thomas789
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.

Re: Problem uninstalling Msiexe.exe

Published: June 11, 2021 - 11:48
by florentR2
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.

Re: Problem uninstalling Msiexe.exe

Published: June 11, 2021 - 2:55 PM
by thomas789
Thanks anyway!

Re: Problem uninstalling Msiexe.exe

Published: June 14, 2021 - 11:36
by elelay
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,

Re: Problem uninstalling Msiexe.exe

Published: June 15, 2021 - 10:29
by dcardon
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.).

Re: Problem uninstalling Msiexe.exe

Published: June 15, 2021 - 11:47
by thomas789
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.

Re: Problem uninstalling Msiexe.exe

Published: June 15, 2021 - 11:52 AM
by dcardon
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.

Re: [SOLVED] Msiexe.exe uninstallation problem

Published: June 15, 2021 - 2:00 PM
by thomas789
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.