Solved

DOS Errorlevel

Posted on 1997-11-04
1
1,076 Views
Last Modified: 2008-03-10
How can I set a DOS errorlevel,while exiting a Delphi aplication liked as a console aplication.
0
Comment
Question by:cynolebias
1 Comment
 
LVL 3

Accepted Solution

by:
mirek071497 earned 50 total points
Comment Utility
ExitProcess( errnr ) or Halt( errnr )

However you may have some difficulties with using this, because in WinNT you can't set errorlevel for other process.

example

in any.bat you can't use this :

myprog.exe
if errorlevel==2 ....

this is because myprog.exe can't set environment for any.bat which is other process.


0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now