With this I made an errorlhandler :)
:: Errorhandler
:Error
echo %date% %time% %AppName% >>"%LogFinal%"
if %errorlevel% EQU 1 echo ERROR 1 - [NOT-SUCCESS] - Fatal Error >>"%LogFinal%"
if %errorlevel% EQU 13 echo ERROR 13 - [INVALID_DATA] - The data is invalid >>"%LogFinal%"
if %errorlevel% EQU 87 echo ERROR 87 - [INVALID_PARAMETER] - One of the parameters was invalid. >>"%LogFinal%"
if %errorlevel% EQU 1601 echo ERROR 1601 - [FAILURE] - The Windows Installer service could not be accessed >>"%LogFinal%"
if %errorlevel% EQU 1602 echo ERROR 1602 - [INSTALL_USEREXIT] - User cancel installation >>"%LogFinal%"
if %errorlevel% EQU 1603 echo ERROR 1603 - [INSTALL_FAILURE] - Fatal error during installation >>"%LogFinal%"
if %errorlevel% EQU 1604 echo ERROR 1604 - [INSTALL_SUSPEND] - Installation suspended, incomplete >>"%LogFinal%"
if %errorlevel% EQU 1608 echo ERROR 1608 - [UNKNOWN_PROPERTY] - Unknown property >>"%LogFinal%"
if %errorlevel% EQU 1610 echo ERROR 1610 - [BAD_CONFIGURATION] - The configuration data for this product is corrupt >>"%LogFinal%"
if %errorlevel% EQU 1612 echo ERROR 1612 - [INSTALL_SOURCE_ABSENT] - The installation source for this product is not available >>"%LogFinal%"
if %errorlevel% EQU 1613 echo ERROR 1613 - [INSTALL_PACKAGE_VERSION] - Servicepack required >>"%LogFinal%"
if %errorlevel% EQU 1618 echo ERROR 1618 - [INSTALL_ALREADY_RUNNING] - Another installation is already in progress >>"%LogFinal%"
if %errorlevel% EQU 1619 echo ERROR 1619 - [_INSTALL_PACKAGE_OPEN] - This installation package could not be opened >>"%LogFinal%"
if %errorlevel% EQU 1621 echo ERROR 1621 - [INSTALL_UI_ERROR] -There was an error starting the Windows Installer >>"%LogFinal%"
if %errorlevel% EQU 1624 echo ERROR 1624 - [INSTALL_TRANSFORM_FAILURE] - Error applying transforms >>"%LogFinal%"
if %errorlevel% EQU 1639 echo ERROR 1639 - [INVALID_COMMAND_LINE] - Invalid command line argument >>"%LogFinal%"
if %errorlevel% EQU 3010 echo ERROR 3010 - [SUCCESS_REBOOT_REQUIRED] - A restart is required to complete >>"%LogFinal%"
echo %date% %time% ERROR: %ERRORLEVEL% >>"%LogFile%"
echo Error: %ERRORLEVEL%
if exist "%Logs%\finalcheck.log" copy /y "%Inst%\Scripts\BITTE ANSCHAUEN.lnk" "%PUBLIC%\Desktop\BITTE ANSCHAUEN.lnk"
echo. -
tecrumors
11 years ago
Well look at you, getting all fancy with your ErrorHandler... :-)
Now for the uneducated in the group (me), can you explain how and when you would implement this? -
ekgcorp
11 years ago
I will make a blog about that, as soon I have spare time :) -
tecrumors
11 years ago
This website uses cookies.
By continuing to use this site and/or clicking the "Accept" button you are providing consent
Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our
websites or when you do business with us. For more information about our
Privacy Policy and our data protection
efforts, please visit
GDPR-HQ
:: Errorhandler
:Error
echo %date% %time% %AppName% >>"%LogFinal%"
if %errorlevel% EQU 1 echo ERROR 1 - [NOT-SUCCESS] - Fatal Error >>"%LogFinal%"
if %errorlevel% EQU 13 echo ERROR 13 - [INVALID_DATA] - The data is invalid >>"%LogFinal%"
if %errorlevel% EQU 87 echo ERROR 87 - [INVALID_PARAMETER] - One of the parameters was invalid. >>"%LogFinal%"
if %errorlevel% EQU 1601 echo ERROR 1601 - [FAILURE] - The Windows Installer service could not be accessed >>"%LogFinal%"
if %errorlevel% EQU 1602 echo ERROR 1602 - [INSTALL_USEREXIT] - User cancel installation >>"%LogFinal%"
if %errorlevel% EQU 1603 echo ERROR 1603 - [INSTALL_FAILURE] - Fatal error during installation >>"%LogFinal%"
if %errorlevel% EQU 1604 echo ERROR 1604 - [INSTALL_SUSPEND] - Installation suspended, incomplete >>"%LogFinal%"
if %errorlevel% EQU 1608 echo ERROR 1608 - [UNKNOWN_PROPERTY] - Unknown property >>"%LogFinal%"
if %errorlevel% EQU 1610 echo ERROR 1610 - [BAD_CONFIGURATION] - The configuration data for this product is corrupt >>"%LogFinal%"
if %errorlevel% EQU 1612 echo ERROR 1612 - [INSTALL_SOURCE_ABSENT] - The installation source for this product is not available >>"%LogFinal%"
if %errorlevel% EQU 1613 echo ERROR 1613 - [INSTALL_PACKAGE_VERSION] - Servicepack required >>"%LogFinal%"
if %errorlevel% EQU 1618 echo ERROR 1618 - [INSTALL_ALREADY_RUNNING] - Another installation is already in progress >>"%LogFinal%"
if %errorlevel% EQU 1619 echo ERROR 1619 - [_INSTALL_PACKAGE_OPEN] - This installation package could not be opened >>"%LogFinal%"
if %errorlevel% EQU 1621 echo ERROR 1621 - [INSTALL_UI_ERROR] -There was an error starting the Windows Installer >>"%LogFinal%"
if %errorlevel% EQU 1624 echo ERROR 1624 - [INSTALL_TRANSFORM_FAILURE] - Error applying transforms >>"%LogFinal%"
if %errorlevel% EQU 1639 echo ERROR 1639 - [INVALID_COMMAND_LINE] - Invalid command line argument >>"%LogFinal%"
if %errorlevel% EQU 3010 echo ERROR 3010 - [SUCCESS_REBOOT_REQUIRED] - A restart is required to complete >>"%LogFinal%"
echo %date% %time% ERROR: %ERRORLEVEL% >>"%LogFile%"
echo Error: %ERRORLEVEL%
if exist "%Logs%\finalcheck.log" copy /y "%Inst%\Scripts\BITTE ANSCHAUEN.lnk" "%PUBLIC%\Desktop\BITTE ANSCHAUEN.lnk"
echo. - tecrumors 11 years ago
Now for the uneducated in the group (me), can you explain how and when you would implement this? - ekgcorp 11 years ago