Exécution d'un plan de maintenance : Exemple de fichier de lot

Dans cet exemple, le fichier de lot qui exécute le plan de maintenance « db », un message reflétant le code de retour duplan de maintenance s'affiche sur la ligne de commande.

echo off


if not defined errorlevel goto end


"C:\Program Files\ReadSoft\INVOICES\Bin\eimngr.exe" /m db


if errorlevel 2 goto answer2


if errorlevel 1 goto answer1


:answer0


echo Maintenance plan executed without errors.


pause


goto end


:answer1


echo Maintenance plan executed with minor errors. Please check the log file for details.


pause


goto end


:answer2


echo Maintenance plan could not be executed. Please check the log file for details.


pause


:end


echo on