Clean Zoom 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
Locked
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

April 9, 2020 - 1:11 PM

Hello everyone,
following the controversies and revelations about Zoom:
https://www.journaldunet.com/web-tech/g ... ui-craque/
So we had to search for a way to easily clean it up on our network (installed for many in AppData).

Zoom offers an uninstaller: https://support.zoom.us/hc/en-us/articl ... anZoom.exe

Here is the package code:

Code: Select all

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

uninstallkey = []

def install():
    install_exe_if_needed("CleanZoom.exe",'/VERYSILENT',key='',min_version='6.5.64722.0907')
The version with scanning via audit (Enterprise) with installation space management via the control file (installed_size):

Code: Select all

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

uninstallkey = []

#Présence de Zoom
ifZoom = 'False'

#Récupération de tous les utilisateurs
AllUsers = glob.glob('C:\Users\*')

#Récupération du contenu AppData
for User in AllUsers :
    FolderAppData = glob.glob(User + '\AppData\Roaming\*')

    #test de la présence du dossier Zoom
    for Folder in FolderAppData :
        FindZoom = Folder.find('Zoom')
        if FindZoom != -1 :
            ifZoom = True

#Récupération de l'espace disponible
Freespace = get_disk_free_space('C:')

#Récupération de l'espace nécessaire à l'installation
Control = PackageEntry().load_control_from_wapt('.')
Usespace = Control.installed_size

def install():

    #Test si place disponible
    if Freespace > Usespace :
        filecopyto('CleanZoom.exe',makepath('C:'))
        if ifZoom == True :
            install_exe_if_needed("CleanZoom.exe",'/VERYSILENT',key='',min_version='6.5.64722.0907')

def uninstall():
    remove_file("C:\CleanZoom.exe")

def audit():

    if ifZoom != False :
        killalltasks('Zoom.exe')
        install_exe_if_needed("C:\CleanZoom.exe",'/VERYSILENT',key='',min_version='6.5.64722.0907')
        return "WARNING"
    else :
        return "OK"
If this can help you make your parks safer ;)
Last edited by Gaetan on 10 Apr 2020 - 11:19, edited 3 times.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

April 9, 2020 - 1:23 PM

Hi Gaëtan,

since you're in a corporate environment, you can add a `def audit()` function that checks if Zoom has been reinstalled by scanning users' appdata.

See you soon,

Denis
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
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

April 9, 2020 - 1:27 PM

Hi Denis,
thanks for the info, I'll look into it, thanks. ;)
Could it work if we check if it's listed among the installed software?
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

April 9, 2020 - 2:32 PM

Hi Gaetan, :)

WAPT might not detect installations in the user environment. Instead, use the audit function as Denis suggested.

With the following WAPT functions, you should be able to manage: ` ;)

if isdir():
glob.glob()`
and `makepath()`.


Cheers,
Jimmy
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

April 10, 2020 - 11:00 AM

Hello,
thank you for the information, it's done.
I'm updating the original post.
I think this piece of code will help me do a lot of cleanup. :)
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 10, 2020 - 1:34 PM

There's nothing like implementing SRPs to permanently solve this kind of problem:

https://www.youtube.com/watch?v=jrDVC-9JlF4
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

April 10, 2020 - 1:35 PM

Thanks Simon, I'll take a look at that. ;)
Locked