1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| @echo off
REG QUERY HKEY_LOCAL_MACHINE\Software\...\Uninst
set err1=%errorlevel%
REG QUERY HKEY_LOCAL_MACHINE\Software\...\Deploy
set err2=%errorlevel%
if %err2% equ 1 (
if %err1% equ 1 (
echo DESINSTALLATION...
<cmd de désinstall>
set err3=%errorlevel%
if %err3% equ 1 (
goto install
)
echo DESINSTALLATION TERMINEE
REG ADD HKLM\Software\...\Uninst
goto install
)
)
else (
if %err2% equ 1 (
:install
cls
echo INSTALLATION...
msiexec -i ...
set err4=%errorlevel%
REG ADD HKLM\Software\...\Deploy
echo %date% %time% %hostname% code erreur : %err4% >> \\<@reseau>\machin.log
) |
Partager