Jump to content

Recommended Posts

Posted

Hi everybody,

I am new in programming... Excuse my ignorance.

I use dos command in a batch to install programs, copy files and delete icons.

I would like to add a few lines at the end of the batch.

If no errors appends, i would like the batch to tell me something like : Everything OK.

If some errors (missings files, wrong directory or whatever appends, I would like the errors written in a txt or a window.

I'm sure this is possible, but I can't make it.

I've been heard of sth like : >> texte.tx

Unfortunately ...

Please and thanks in advance.

GG


Posted

You must use variable %Errorlevel% (hope so I understand your request)... E.g.

If %ErrorLevel% NEQ 0 echo Error during installation of XXX >> %systemdrive%\ErrorInstall.log

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...