[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 920
  • Last Modified:

CMD window size and position

How do I specify within my batch file the size and position of the cmd window.

I would like it to be 1" x 2" and in the upper left corner.
0
CMILLER
Asked:
CMILLER
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Never seen a way to specify the cmd window from within itself.  In addition, keep in mind that what's 1 inch on your screen could be 3/4 of 1 1/2 inches on someone elses, depending on the resolution used.  If there is a way I'm not aware of, you'll need to specify pixel size which could vary on workstations.
0
 
CMILLERAuthor Commented:
How would I specify the pixel size?
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Like I said:

> If there is a way I'm not aware of, you'll need to specify pixel size
> which could vary on workstations.

Probably should have said this instead:

> If there is a way I'm not aware of, you would likely need to specify
> pixel size which could vary on workstations.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
CMILLERAuthor Commented:
any ideas on a script that will create a small text window.

ex:
*********************************
@echo off
color 48
echo Installing KB893086
@echo off
kb893086-xp.exe /quiet /norestart /overwriteoem /nobackup
exit
*********************************

Have something pop up that has information in it
"Installing KB893086"
0
 
spiderfixCommented:
>>a script that will create a small text window<<


MsgBox "a script that will create a small text window"


...save that in Notepad as message.vbs
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
or just add

NET SEND %computername% Installing KB893086
0
 
softplusCommented:
You can specify the size +position of your standard cmd windows (this is from Win2000, german  - so possible translation errors :)):
- open a cmd window through a shortcut (i.e. drag cmd.exe from the windows folder onto the desktop, choose "create shortcut")
- click in the command box (where the black c:\ is, top left corner), choose "properties"
- tab Font: changing the font size changes the window size, i.e. try 4x6
- tab Layout: change the position to 20, 20 (or whatever you want)
- Save with "OK" - it will ask you if the changes are only for this window or all windows opened by the same shortcut, choose the second.
Done :)

As for windows / popups -- remember that these DO NOT close by themselves. If you want them shut afterwards, you will either need to hack (i.e. programmatically select the window and use SendKeys) or make a program wrapper for all of this (opening and closing windows).
0
 
brianadkinsCommented:

adding to spiderfix's solution:

in your batch file, you can use this as a shortcut:

echo msgbox "Installing KB893086" >%temp%\KB893086.vbs &%temp%\KB893086.vbs
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now