batch cmd window size

Posted on 2004-11-04
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
    LVL 9

    Expert Comment

    I'm not sure, maybe this will help:

    START banner.bat /max /normal

    Type:  START /?  for more info.


    Author Comment

    that did not sem to change anything
    LVL 30

    Accepted Solution

    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

    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

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

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Preface In the first article: A Better Website Login System ( I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
    Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now