Shortcut that increases size of batch window (pixels)

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Shortcut that increases size of batch window (pixels)

#1 Post by MrKnowItAllxx » 04 Apr 2012 18:45

To keep it simple I'll just say I use this shortcut (lifted off a game I downloaded a long time ago) to launch my batch program "Maze.bat" and while I should probably know what exactly this does, I don't... All I know is that when I run this shortcut it makes the batch window quite a bit bigger, I just wanted to know maybe how this works or if there are other switches / tricks like this I could use to do different things

Target of shortcut: %ComSpec% /K "Maze.bat"
Last edited by MrKnowItAllxx on 04 Apr 2012 19:12, edited 1 time in total.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Shortcut to maximize batch window

#2 Post by abc0502 » 04 Apr 2012 18:51

you can add this after the @echo off like that

Code: Select all

@echo off
cls
mode 80,50

the mode controle the width and the hight of the window

if you would like to open the batch maximized add there is a switch /max but this is used to launch other application maximized i don't know about how to use it to start the same batch maximized
it is used like that:

Code: Select all

@echo off
cls
start /max cmd.exe
pause

MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Re: Shortcut to maximize batch window

#3 Post by MrKnowItAllxx » 04 Apr 2012 18:59

Hmm, you should try running the shortcut yourself to understand what I mean by "maximized". The window is literally bigger than if you were to use 'set mode con cols:xx :lines:xx'. I'll try to get pics, but in the mean time try running it with any batch file.

Also if it makes a difference I run vista, but when I ran this on win XP I got a fullscreen batch file, vista is just bigger.

edit: when I read over your code I thought you put 'set mode con cols:xx :lines:xx' - lol, I'm going to go mess around with your mode command, sorry about that

MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Re: Shortcut to maximize batch window

#4 Post by MrKnowItAllxx » 04 Apr 2012 19:10

I would like to ask, is 'mode xx,xx' the same as 'set mode con cols:xx lines:xx'?? It appears to be the same function.

Anyway, I will see if I can retitle this post, because I still notice that when I run with this shortcut as opposed to regularly running the batch file, the actual pixels of the window are displayed bigger.

For example, if I regularly run your program

Code: Select all

@echo off
cls
mode 80,50
pause


It is smaller than if I run it through the shortcut.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Shortcut that increases size of batch window (pixels)

#5 Post by abc0502 » 04 Apr 2012 19:22

you will have to chnage the numbers like 110,90 like that
if you are trying to make a batch that start a program or another batch in max size try this code

Code: Select all

@echo off
cls
start /max %ComSpex% /c "put your programe directory here"

try it

MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Re: Shortcut that increases size of batch window (pixels)

#6 Post by MrKnowItAllxx » 04 Apr 2012 19:35

I ran this (spelling fixes) but not the same effect =/

Code: Select all

@echo off
cls
start /max %ComSpec% /k "Maze.bat"


Can anyone explain this to me?

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Shortcut that increases size of batch window (pixels)

#7 Post by abc0502 » 04 Apr 2012 19:44

basicly u want to run the maze.bat in a full screen, what is your screen resoulution

start is a command that used to run other progras
/max it tell the start command to start the program at it max size
%comspec% it is cmd.exe
/c tell the comspec or cmd to start the program and then exit so there will be no black cmd window appeared after the program start

u used /k this switch make the cmd window to remain in the desktop after starting the program :)


foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Shortcut that increases size of batch window (pixels)

#9 Post by foxidrive » 04 Apr 2012 21:57

MrKnowItAllxx wrote: launch my batch program "Maze.bat" All I know is that when I run this shortcut it makes the batch window quite a bit bigger

Target of shortcut: %ComSpec% /K "Maze.bat"


It is not the command that is increasing the window size, the properties of maze.bat must have been changed to increase the window size.

MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Re: Shortcut that increases size of batch window (pixels)

#10 Post by MrKnowItAllxx » 06 Apr 2012 11:30

My apologies for all of this. :| I found that the properties of the shortcut had been changed and it has nothing to do with the command

But I learned something regardless, thanks for your time :)

Post Reply