batch cmd window size

Posted on 2004-11-04
Medium Priority
Last Modified: 2013-11-18
I have a logon script that has

start banner.bat

is there any way to size this to be the same for all that logon
Question by:CMILLER
  • 2
  • 2

Expert Comment

ID: 12502320
I'm not sure, maybe this will help:

START banner.bat /max /normal

Type:  START /?  for more info.


Author Comment

ID: 12504799
that did not sem to change anything
LVL 30

Accepted Solution

SteveGTR earned 2000 total points
ID: 12505405
Here's a complicated way that I found:

1) Open registry (regedit) and navigate to HKEY_CURRENT_USER\Console\DOS (could use Command Prompt if DOS isn't there)

2) Select Registry --> Export Registry File

3) Set File name to c:\temp\banner.reg or whereever you want to put it

4) Select Save as type as Win9x/NT4 Registration Files (REGEDIT4)

5) Click Save

6) Open up c:\temp\banner.reg using notepad

7) Change [HKEY_CURRENT_USER\Console\DOS] to [HKEY_CURRENT_USER\Console\Banner] and save

8)  Open registry and select Registry --> Import Registry File

9) Select c:\temp\banner.reg

10) Navigate to HKEY_CURRENT_USER\Console\Banner

11) Add a new DWORD value and name it WindowPosition

12) Give it a value based on this:

Specifies the position of the command window on the user's screen.

The value of this entry is an 8-byte hexadecimal value. The first four bytes (high word) represent the position of the window on the Y (vertical) axis. The last four bytes (low word) represent the position of the window on the X (horizontal) axis.

13) Open a DOS prompt to test it out and fine tune the setting. To test say:

start "Banner" cmd

14) When you've got it like you want it open registry and navigate to HKEY_CURRENT_USER\Console\Banner

15) Repeat steps 2 - 5

16) In the login processing import the registry file using the REG IMPORT command. You can dynamically build the registry file if you want by echoing out the data to a temp.reg file.

17) Issue the command: start "Banner" banner.bat

Good Luck,

Author Comment

ID: 12505481
looking at that, will it change the way that all cmd's open

if I ran a
start, run, cmd

would it default open to the same size?

LVL 30

Expert Comment

ID: 12505495
It will only change the position of command consoles with the title "Banner".

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question