Reputation: 2292
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.
Upvotes: 0
Views: 107
Reputation: 49260
How to avoid cmd errors causing GUI dialogs?
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.
Upvotes: 1