Page 1 of 1

Clean Zoom Package

Published: April 9, 2020 - 1:11 PM
by Gaetan
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 ;)

Re: Clean Zoom Package

Published: April 9, 2020 - 1:23 PM
by dcardon
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

Re: Clean Zoom Package

Published: April 9, 2020 - 1:27 PM
by Gaetan
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?

Re: Clean Zoom Package

Published: April 9, 2020 - 2:32 PM
by jpele
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

Re: Clean Zoom Package

Published: April 10, 2020 - 11:00 AM
by Gaetan
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. :)

Re: Clean Zoom Package

Published: April 10, 2020 - 1:34 PM
by sfonteneau
There's nothing like implementing SRPs to permanently solve this kind of problem:

https://www.youtube.com/watch?v=jrDVC-9JlF4

Re: Clean Zoom Package

Published: April 10, 2020 - 1:35 PM
by Gaetan
Thanks Simon, I'll take a look at that. ;)