Software Uninstallation

Share your tips or issues concerning the WAPT Console or WAPT Agent here
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
jjsoueix
Messages: 3
Registration: July 31, 2018 - 4:50 PM

July 31, 2018 - 5:09 PM

Good morning,
First of all, a big thank you for your solution which is a great help to me in my daily life!
I have been using WAPT for a few months and I am stuck trying to uninstall a piece of software that is not in the WAPT repository that I deployed.
I've looked through the documentation and the forum, but I'm stuck on this point...
I would therefore like to remove the "McAfee Security Scan" software from certain workstations in my network
I created an "empty" package with the following code:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
    print('Uninstalling Software McAfee Security Scan')
    for soft in installed_softwares('McAfee Security Scan Plus'):
        run(uninstall_cmd(soft['key']))
        print('MacAfee uninstalled')
    for soft in installed_softwares('McAfee Security Scan Plus'):
            error("Wapt find : %s" % soft)
When installing this package on one of the client machines, the uninstallation fails and I receive the following error message in my administration console:

Code: Select all

EWaptSetupException: Fatal error : Wapt find : {'install_location': '', 'version': u'3.11.717.1', 'name': u'McAfee Security Scan Plus', 'key': u'McAfee Security Scan', 'uninstall_string': u'"C:\\Program Files\\McAfee Security Scan\\uninstall.exe"', 'publisher': u'McAfee, Inc.', 'install_date': '', 'system_component': 0}
Thank you for your feedback :P
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

July 31, 2018 - 10:57 PM

What does it yield?

Code: Select all

    for soft in installed_softwares('McAfee Security Scan Plus'):
        print(uninstall_cmd(soft['key']))
jjsoueix
Messages: 3
Registration: July 31, 2018 - 4:50 PM

August 1, 2018 - 2:32 PM

Thank you very much for the quick response ;)
This command returns the following output:

Code: Select all

Uninstalling Software McAfee Security Scan
[u'C:\\Program Files\\McAfee Security Scan\\uninstall.exe', '/S']
In the meantime, I managed to bypass this blockage with the following instructions in the setup.py file of my package:

Code: Select all

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

uninstallkey = []

def install():
print('Uninstalling Software McAfee Security Scan')
command = r'"C:\Program Files\McAfee Security Scan\uninstall.exe" -S /inner'
run(command)
The /inner argument is missing to truly uninstall this software completely silently... Is it possible to add this argument to the WAPT code?

Code: Select all

 for soft in installed_softwares('McAfee Security Scan Plus'):
        run(uninstall_cmd(soft['key']))
Gorenda
Messages: 6
Registration: August 9, 2018 - 5:34 PM

August 21, 2018 - 4:25 PM

Hello,

I just had the same problem as you.

I run the command, my software uninstalls itself, but I get an error message.

I put the uninstallation command in `def uninstall()`

and then it works.
Locked