Déploiement en organisation

Déploiement en organisation / Installation des logiciels par l’administrateur / Déploiement automatisé sur plusieurs postes / Autres outils de déploiement automatisé / Exemples de scripts / Exemple de script pour l’installation de mises à jour

Exemple de script pour l’installation de mises à jour

Dans cet exemple, la présence des fichiers d’Antidote 12 et de Connectix est vérifiée afin de ne lancer la mise à jour que sur les installations existantes.

@echo OFF
rem Attention ce fichier est encodé en code page DOS-850

rem Attention : Ne pas utiliser ce script pour un déploiement initial.

echo Mise à jour d'Antidote 12...

set CHEMIN_SERVEUR=\\SERVEUR\DossierAntidote
set CHEMIN_LOCAL=C:\Program Files\Druide
set CHEMIN_ANTIDOTE=%CHEMIN_LOCAL%\Antidote 12
set CHEMIN_CONNECTIX=%CHEMIN_LOCAL%\Connectix 12
set CHEMIN_LOG=%PROGRAMDATA%\Druide

mkdir "%CHEMIN_LOG%"

if not exist "%CHEMIN_ANTIDOTE%\Application\Bin64\Antidote.exe" goto OK_ANTIDOTE
if not exist "%CHEMIN_SERVEUR%\Antidote12.msi" goto OK_ANTIDOTE
msiexec /qn REINSTALL=ALL REINSTALLMODE=vomus /i "%CHEMIN_SERVEUR%\Antidote12.msi" TRANSFORMS="%CHEMIN_SERVEUR%\ReseauAntidote.mst;%CHEMIN_SERVEUR%\Antidote12-Interface-fr.mst" /l*v "%CHEMIN_LOG%\logMajAntidote12.txt"
:OK_ANTIDOTE

if not exist "%CHEMIN_ANTIDOTE%\LingFR\Bin64\libLingFR.dll" goto OK_MODULE_FR
if not exist "%CHEMIN_SERVEUR%\Antidote12-Module-francais.msi" goto OK_MODULE_FR
msiexec /qn REINSTALL=ALL REINSTALLMODE=vomus /i "%CHEMIN_SERVEUR%\Antidote12-Module-francais.msi" TRANSFORMS="%CHEMIN_SERVEUR%\Antidote12-Module-francais-Interface-fr.mst" /l*v "%CHEMIN_LOG%\logMajAntidote12_Module_Français.txt"
:OK_MODULE_FR

if not exist "%CHEMIN_ANTIDOTE%\LingEN\Bin64\libLingEN.dll" goto OK_MODULE_EN
if not exist "%CHEMIN_SERVEUR%\Antidote12-English-module.msi" goto OK_MODULE_EN
msiexec /qn REINSTALL=ALL REINSTALLMODE=vomus /i "%CHEMIN_SERVEUR%\Antidote12-English-module.msi" TRANSFORMS="%CHEMIN_SERVEUR%\Antidote12-English-module-Interface-fr.mst" /l*v "%CHEMIN_LOG%\logMajAntidote12_English_Module.txt"
:OK_MODULE_EN

if not exist "%CHEMIN_CONNECTIX%\Application\Bin64\Connectix.exe" goto OK_CONNECTIX
if not exist "%CHEMIN_SERVEUR%\Antidote-Connectix12.msi" goto OK_CONNECTIX
msiexec /qn REINSTALL=ALL REINSTALLMODE=vomus /i "%CHEMIN_SERVEUR%\Antidote-Connectix12.msi" TRANSFORMS="%CHEMIN_SERVEUR%\ReseauConnectix.mst;%CHEMIN_SERVEUR%\Antidote-Connectix12-Interface-fr.mst" /l*v "%CHEMIN_LOG%\logMajAntidote12_Connectix.txt"
:OK_CONNECTIX