Test of ERRORLEVEL

vbimport

#1

Hello !

I’m writing an application of making archives.
I need of a return code like errorlevel.

Is anybody knows how to audit the process NeroCmd ?

Thank’s
Josiane


#2

I am not exactly sure what is it that you are asking but NeroCMD does set errorlevel. You can find the values in NeroSDK\NeroCmd\Src\ExitCode.h of the NeroSDK archive.


#3

Hello !

I find the answer …

IF ERRORLEVEL 1 … Does’nt work but
goto %ERRORLEVEL% … DOES !!!

See the sample :

ECHO OFF
e:
eroSDK-1.05\NeroCmd\NeroCmd --cdinfo --drivename f
goto a%ERRORLEVEL%
:a0
ECHO Ok.
goto :fin
:a1
ECHO Bad usage!
goto :fin
:a2
ECHO Internal error!
goto :fin
:a3
ECHO NEROAPI.DLL was not found!
goto :fin
:a4
ECHO Serial number was not found!
goto :fin
:a5
ECHO Serial number is invalid!
goto :fin
:a6
ECHO No CD was inserted!
goto :fin
:a7
ECHO CDRW is not supported!
goto :fin
:a8
ECHO There was an error erasing CDRW!
goto :fin
:a9
ECHO There was an error obtaining a list of available drives!
goto :fin
:a10
ECHO Drive name is missing!
goto :fin
:a11
ECHO There was an error while trying to access the drive!
goto :fin
:a12
ECHO Drive was not found!
goto :fin
:a13
ECHO Unknown CD format!
goto :fin
:a14
ECHO Invalid drive!
goto :fin
:a15
ECHO Burn process failed!
goto :fin
:a16
ECHO Function was not allowed!
goto :fin
:a17
ECHO Drive was not allowed!
goto :fin
:a18
ECHO There was an error obtaining CD info!
goto :fin
:a19
ECHO Track was not found!
goto :fin
…/…