In my cmd batch files, how may I avoid OS errors causing GUI dialogs like this
http://img221.imageshack.us/img221/4792/betachriswindowedbetare.png
?
This prevents me using e.g. the Close box. I would like all errors reported to the console.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In short: you can’t.
Windows basically supports two types of (usermode) application types: console (mode) or windows (graphical).
However, there is nothing enforced here. Every console mode application may have GUI elements (e.g. popup a message box in case of an error) and every GUI application may start a console and issue stuff there (see AllocConsole Win32 function).
So unless every application/command you call from your batch file either
or
there is no way to assure that what you seek.