Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | Dernière révision Les deux révisions suivantes | ||
tuto:gestion_de_parc:wpkg:start [30/10/2015 12:17] dani [Logiciels] |
tuto:gestion_de_parc:wpkg:start [30/10/2015 14:59] dani [Mises à jour locales] |
||
---|---|---|---|
Ligne 50: | Ligne 50: | ||
<code batch> | <code batch> | ||
- | net use W: https:// | + | @echo off |
- | robocopy /MIR W:\ %SystemDrive%\wpkg\repository\ | + | |
+ | SET USER=deploiement | ||
+ | SET PASS=p@ssw0rd | ||
+ | SET REPO=https:// | ||
+ | REM SET REPO=\\192.168.7.1\wpkg | ||
+ | |||
+ | echo %DATE% %TIME% > %SystemDrive\wpkg\status\sync_in_progress.txt | ||
+ | |||
+ | net use W: %REPO% | ||
+ | |||
+ | robocopy /MIR /R:10 / | ||
+ | |||
+ | REM Fatal Error | ||
+ | if %ERRORLEVEL% EQU 16 goto cleanup | ||
+ | REM Copy done, with errors, mismatches and new files not copied | ||
+ | if %ERRORLEVEL% EQU 15 goto cleanup | ||
+ | REM Copy failed, with mismatches and new files not copied | ||
+ | if %ERRORLEVEL% EQU 14 goto cleanup | ||
+ | REM Copy done, with errors and mismatches | ||
+ | if %ERRORLEVEL% EQU 13 goto cleanup | ||
+ | REM Copy failed with mismatches | ||
+ | if %ERRORLEVEL% EQU 12 goto cleanup | ||
+ | REM Copy done with errors and new files not copied | ||
+ | if %ERRORLEVEL% EQU 11 goto cleanup | ||
+ | if %ERRORLEVEL% EQU 10 echo FAIL + XTRA & goto end | ||
+ | REM Copy done with errors | ||
+ | if %ERRORLEVEL% EQU 9 goto cleanup | ||
+ | REM Copy failed | ||
+ | if %ERRORLEVEL% EQU 8 goto cleanup | ||
+ | REM Copy done, with mismatches and new files not copied | ||
+ | if %ERRORLEVEL% EQU 7 goto cleanup | ||
+ | REM Mismatches and new files not copied | ||
+ | if %ERRORLEVEL% EQU 6 goto cleanup | ||
+ | REM Copy done with mismatches | ||
+ | if %ERRORLEVEL% EQU 5 goto cleanup | ||
+ | REM Mismatches | ||
+ | if %ERRORLEVEL% EQU 4 goto cleanup | ||
+ | REM Copy done, new files not copied | ||
+ | if %ERRORLEVEL% EQU 3 goto cleanup | ||
+ | REM New files not copied | ||
+ | if %ERRORLEVEL% EQU 2 goto cleanup | ||
+ | REM Copy done, we have new files, updates is required | ||
+ | if %ERRORLEVEL% EQU 1 goto exec | ||
+ | REM No error, nothing copied, no updates | ||
+ | if %ERRORLEVEL% EQU 0 goto cleanup | ||
+ | |||
+ | :exec | ||
+ | echo %DATE% %TIME% > %SystemDrive%\wpkg\status\updates_pending.txt | ||
+ | goto :EOF | ||
+ | |||
+ | :cleanup | ||
+ | del %SystemDrive\wpkg\status\sync_in_progress.txt | ||
</ | </ |