Solved log of errors

September 8, 2011 at 04:37:23
Specs: Windows 7
I would like to make a log file if there is any error.
I would like to have a description of the error not just the error number.

here is my script

if ERRORLEVEL 1 goto error


REM There was a problem
SET DateStr=%date% at %time%
ECHO Error Log Open >>C:\ERR.LOG
ECHO Error: %DateStr% >>C:\ERR.LOG

REM ?????? ECHO Error Msg: %errorMsg% >>C:\ERR.LOG

See More: log of errors

Report •

September 8, 2011 at 05:04:17
✔ Best Answer
Errorlevels vary between programs, but maybe:

net helpmsg %errorlevel%

Report •

September 8, 2011 at 05:19:51
Yes, it works. thanks a lot!

Report •
Related Solutions

Ask Question