
Je m'explique, au boulot, on a une multitude de zipper, et je voulais homogénéiser le parc.
Du coup, il me fallait désinstaller tous les zippers pour ensuite installer 7Zip9.20 (gratuit et puissant)
Comment ça fonctionne ?
Simplement, je test la non-présence des répertoires, si le dossier existe je désinstalle silencieusement l'application, sinon je saute la partie du script correspondant pour passer au prochain zipper.
L'installation de 7Zip9.20 se fera via un déploiement avec mon serveur OCS Inventory
Code : Tout sélectionner
@echo off
SET Rep7Z=c:\progra~1\7-Zip
SET RepWinRar=c:\progra~1\WinRAR
SET RepWinZip=c:\progra~1\WinZip
Echo =
Echo =======================================
Echo = MAINTENANCE DES POSTES DE TRAVAIL =
Echo DESINSTALLATION 7-ZIP, WinRAR et WinZIP
Echo =======================================
Echo =
IF NOT EXIST %Rep7Z% goto 7ZNUL
Echo -
Echo ---------------------------------------
Echo DESINSTALLATION DE 7-ZIP
Echo ---------------------------------------
Echo -
%Rep7Z%\uninstall.exe /S
ping 127.0.0.1 -n 21 > NUL
:7ZNUL
IF NOT EXIST %RepWinRar% goto WRNUL
Echo -
Echo ---------------------------------------
Echo DESINSTALLATION DE WINRAR
Echo ---------------------------------------
Echo -
%RepWinRar%\uninstall.exe /S
taskkill /F /IM "WinRAR.exe"
ping 127.0.0.1 -n 21 > NUL
:WRNUL
IF NOT EXIST %RepWinZip% goto WZNUL
Echo -
Echo ---------------------------------------
Echo DESINSTALLATION DE WINZIP
Echo ---------------------------------------
Echo -
taskkill /F /IM wzqkpick.exe
wmic product where "name like '%%winzip%%'" call Uninstall
If Exist %RepWinZip%\winzip32.exe goto 64
If Exist %RepWinZip%\winzip32.exe "%RepWinZip%\Winzip32.exe" /Uninstallx
taskkill /F /IM iexplore.exe
:64
%RepWinZip%\Winzip32.exe /Uninstallx
taskkill /F /IM iexplore.exe
ping 127.0.0.1 -n 21 > NUL
:WZNUL
@echo on
Exit