Hey There,
It's not exactly code, but it may serve your purpose:
This solution works in XP
I have not tested it in older versions.
It saves your settings in the registry, so ...
it will work for the computer you are on only.
If you change your mind after doing this, I know of no way to reverse the settings without going to regedit.
Start your program with a line like the following:
start "My Program Full" "My Program.exe"
In this example "My Program Full" is a title for the command window.
(If you skip the title, it will use the name of the executable as the title instead.)
After your program opens,
Right Click on the title bar
Click "Properties"
Under - Options Tab - Display Options - Click "Full Screen"
Click "OK"
Click "Save properties for future windows with same title"
Click "OK"
Close your program and test.
Now go to Regedit an look for this key:
[HKEY_CURRENT_USER\Console\My Program Full]
Or, if you didn't title it:
[HKEY_CURRENT_USER\Console\My Program.exe]
The settings will be something like this:
"FullScreen"=dword:00000001
"FontSize"=dword:000c0008
"FontFamily"=dword:00000030
"FontWeight"=dword:00000190
"HistoryNoDup"=dword:00000000
If you want to change back to a window change the "FullScreen" value from 1 to 0
"FullScreen"=dword:00000000 = Window
"FullScreen"=dword:00000001 = Full Screen
As you can see, there are any number of other settings you can save this way.
It is possible under the - Layout Tab - to change "Window Size".
I like working in the CMD window, but under a larger than default size.
The default is 80 x 25. Try 120 x 50.
You might want to try this before you go to the "Full Screen" option.
If you wanted to use these settings on another computer automatically,
You could export the key to a *.reg file.
Then import the registry data to the other computer from the batch file before opening the program.
I'm not familiar with the command line to do that. Maybe someone else can help you there.
P.S. What "DOS" program are you running?
I tested this on a copy of "CMD.exe", renamed to "My Program.exe". It may not work on all "DOS" programs. And it is possible that the registry data will be stored under another key.(A different program = a different key - I'm not sure.) In case that happens, you would have to search for the title to find it. (That's how I found the key in my example.)