O
Oliver Salzburg
Guest
Oliver Salzburg Asks: How can I open a console application with a given window size?
The application I want to start is MongoDB. If I would start it normally, it looks like this:
I don't like the amount of line breaks and I have a lot of screen space, so I would like to utilize said space to get rid of the line breaks.
I can change the size of the console window with
So far, so good. When I start this batch file, I get a larger window, as desired.
But when I now press Ctrl+C to exit MongoDB, I get the annoying prompt:
Which is useless, because the command I just exited out of was the last command in the batch job anyway and no matter what I answer, the result is the same.
So, how can I get a larger console window for the application without having that prompt when I hit Ctrl+C?
The application I want to start is MongoDB. If I would start it normally, it looks like this:
I don't like the amount of line breaks and I have a lot of screen space, so I would like to utilize said space to get rid of the line breaks.
I can change the size of the console window with
MODE
, so I wrote a batch file like this:
Code:
@ECHO OFF
MODE con:cols=140 lines=70
%~dp0mongodb\bin\mongod --dbpath %~dp0data --rest
So far, so good. When I start this batch file, I get a larger window, as desired.
But when I now press Ctrl+C to exit MongoDB, I get the annoying prompt:
Code:
Terminate batch job (Y/N)?
Which is useless, because the command I just exited out of was the last command in the batch job anyway and no matter what I answer, the result is the same.
So, how can I get a larger console window for the application without having that prompt when I hit Ctrl+C?
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.