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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
PAB
Posts: 146
Joined: 12 Aug 2019 13:57

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

#1 Post by PAB » 17 Jul 2020 14:41

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.
Last edited by PAB on 19 Jul 2020 15:53, edited 1 time in total.

T3RRY
Posts: 255
Joined: 06 May 2020 10:14

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

#2 Post by T3RRY » 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.

PAB
Posts: 146
Joined: 12 Aug 2019 13:57

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

#3 Post by PAB » 18 Jul 2020 02:13

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

Post Reply