Also check the available options for the 'start' command via 'start /?'. There are quite a few.
Main Topics
Browse All TopicsI have written a small assembly language program using DEBUG. The program is CALLed from within a batch file so CMD remains open prior to anf after the program executes.
When I run the program in a CMD DOS box under XP Pro, CMD changes it's appearance for a brief moment, then back again causing CMD to appear to 'flash' on the screen.
When running other .COM-type program files such as DOS external commands, this does not happen.
Is there a way to prevent this from happening in my own code?
Also, this isn't a problem when running in full-screen mode or when running in a COMMAND DOS box.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I think it changes by reverting to a COMMAND-like dos box (ie, 25 lines) and the scrollbar disappears. It happens so briefly, it causes the bos to 'flicker' or 'flash' and it's quite distracting.
Even just typing DEBUG in a CMD session does the same... It resizes the CMD DOS box and removes the scrollbar - please try this for yourself to see what I mean.
I have not yet found a solution to this problem. I have searched the internet to no avail however, I have discovered the following:
While CMD is open, clicking the right-hand clip control and selecting 'Properties' from the menu, under the 'Layout' tab there are two settings which control the command box size and it's buffer size: 'Window Size' and 'Screen Buffer Size'.
Setting both the Window Size and the Screen Buffer Size to: Width=80 and Height=25, 43 or 50 sets the size of the CMD box so that it remains a fixed size. This will remove the right-hand scrollbar. These properties changes can be applied to the current CMD session only or all future CMD sessions.
The effect of this change makes the CMD box's appearance the same as a rgular command DOS box. Running a .COM execution file under these conditions solves my problem.
Another approach is to use the MODE command at the beginning of a batch file to get the current CMD box's size and then to set it to a command DOS box-like size as in:
mode|findstr "Lines">mode.txt
mode|findstr "Columns">>mode.txt
mode con: cols=80 lines=50
Then, at the end of the batch file, restore the CMD box size to it's original state by including the following code at the end of the batch file:
for /f "tokens=1-2 delims= " %%a in (mode.txt) do (
if %%a=Lines set Lines=%%b
if %%a=Columns set Columns=%%b
)
mode con: cols=%Columns% lines=%Lines%
I have closed this question but added it to the knowledge base for future reference to others.
Business Accounts
Answer for Membership
by: epochassetPosted on 2009-03-19 at 10:30:39ID: 23932013
Im not sure I understand how its appearance changes, but try adding @echo off as the first line in your batch file. Also, if necessary you could run your program seperate from your instance of cmd.exe by doing this in your batch file,
start %program% (spawns it seperate)