Page 1 of 1

[SOLVED] cmd prompt will not run maximized after CALL script ends.

Posted: 17 Jul 2020 14:41
by PAB
Good evening,

I have a script where I want to CALL another batch script.

Code: Select all

call "%~dp0bin\Test_CALL_File.bat"
The problem I am having is that the CALLed batch script runs in a modified cmd prompt size using . . .

Code: Select all

mode con: cols=70 lines=9 & color 17
. . . and works great if it runs standalone.

Now when that script ends and I get returned to the orinal cmd prompt [ Test_CALL_File.bat ], it is still minimized, although I have . . .

Code: Select all

:Menu
if not "%1"=="max" start /max cmd /c %0 max & exit/b
. . . under the Menu label.

Any help will be greatly appreciated.

Thanks in advance.

Re: cmd prompt will not run maximized after CALL script ends.

Posted: 17 Jul 2020 20:23
by T3RRY
the primary program resumes from the point the call is made - If the :menu label occurs prior to the call, it will not be parsed.

Re: cmd prompt will not run maximized after CALL script ends.

Posted: 18 Jul 2020 02:13
by PAB
T3RRY wrote:
17 Jul 2020 20:23
the primary program resumes from the point the call is made - If the :menu label occurs prior to the call, it will not be parsed.
Thanks for the reply, it is appreciated.

Seeing as the default cmd prompt size is 80 columns x 300 lines, I got round it like this which is enough lines for my needs . . .

Code: Select all

call "%~dp0bin\Test_CALL_File.bat"
mode con: cols=80 lines=100 & color 17