Command Prompt Window Defaults - Programatically?

C

Chavvy

I know how to set the cmd prompt window defaults from the window
itself. However I need to be able to this programatically and apply to
a number of xp pro machines.

Are their relevant reg keys/ini files controlling this?
 
P

Pegasus \(MVP\)

Chavvy said:
I know how to set the cmd prompt window defaults from the window
itself. However I need to be able to this programatically and apply to
a number of xp pro machines.

Are their relevant reg keys/ini files controlling this?

You can set the startup folder in the shortcut that you use for cmd.exe
(same as most other shortcuts).
 
C

Chavvy

Thanks for this. What I am looking for though is the ability to
configure the defaults. Reason being is that the application will be
called from VB and we have found no way of managing the DOS box size
etc from there.

Presumably the dos box settings are stored somewhere and can be
manipulated?
 
P

Pegasus \(MVP\)

Chavvy said:
Thanks for this. What I am looking for though is the ability to
configure the defaults. Reason being is that the application will be
called from VB and we have found no way of managing the DOS box size
etc from there.

Presumably the dos box settings are stored somewhere and can be
manipulated?

How about this one:
cmd.exe /c "mode con lines=50 cols=80 & "c:\Program Files\MyApp\App.exe""

By the way, even though it's a black screen with character mode input, it's
no longer DOS (which is a legacy operating system introduced some thirty
years ago). Cmd.exe is the WinXP Command Processor.
 
J

ju.c

The settings for an executable are saved in the registry here:

[HKEY_CURRENT_USER\Console]

You can export it, delete all but what you want to transfer, then
import it onto other machines.


ju.c
 
C

Chavvy

Thanks for this.

Are you aware though how to do it from a reg file etc? Basically I
need to remotely set the default on around 200 machines for a DOS app
that is called from VB. The VB call cannot pass much through in terms
of managing the DOS box size etc so want to get around this by easily
modiying all defaults.

Cheers.
 
J

ju.c

You're welcome.

Please don't delete previous posts. Users that use
News Readers, like WLM or OE, may delete old posts.
When a new post is added without the previous posts
they cannot see it. Thank you for understanding.


To import the registry file, use reg.exe

You can read the links that I have posted below to
learn about reg.exe commands. It is very easy.


An example to imort a reg file:

From the 'Run box', 'Command Prompt' or a 'Batch File'
enter:

reg import "C:\Path To\RegFile.reg"


REG.exe Examples
http://www.ss64.com/nt/reg.html

Managing the Windows Registry from the Command Prompt with Reg.exe
http://commandwindows.com/reg.htm

What can the REG.EXE command do in Windows XP?
http://www.petri.co.il/reg_command_in_windows_xp.htm

File Downloads (reg.exe):
Command Line Registry Edits
http://www.chaminade.org/mis/Articles/RegistryEdit.htm


ju.c
 
C

Chavvy

You're welcome.

Please don't delete previous posts. Users that use
News Readers, like WLM or OE, may delete old posts.
When a new post is added without the previous posts
they cannot see it. Thank you for understanding.

To import the registry file, use reg.exe

You can read the links that I have posted below to
learn about reg.exe commands. It is very easy.

An example to imort a reg file:

From the 'Run box', 'Command Prompt' or a 'Batch File'
enter:

reg import "C:\Path To\RegFile.reg"

REG.exe Exampleshttp://www.ss64.com/nt/reg.html

Managing the Windows Registry from the Command Prompt with Reg.exehttp://commandwindows.com/reg.htm

What can the REG.EXE command do in Windows XP?http://www.petri.co.il/reg_command_in_windows_xp.htm

File Downloads (reg.exe):
Command Line Registry Editshttp://www.chaminade.org/mis/Articles/RegistryEdit.htm

ju.c

IW:

Thanks again. I am fairly comfortable with the different methods I
have to deploy the change. My issue is still in identifying where
these DOS box defaults are stored, unless I have missed something from
your post.

Regards
 
J

ju.c

You asked how to import from a reg file so I told you to
use reg.exe.

Now you ask where DOS box defaults are stored which I
already told you in my first reply.

So, again, go to this registry key:

[HKEY_CURRENT_USER\Console]

and find the executable that you want to remotely set.

For example:

To export the command window settings for "contig.exe"
export this key, as shown:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Console\C:_Program Files_Hardware_PowerDefrag_Contig.exe]
"ScreenBufferSize"=dword:09c40064
"WindowPosition"=dword:01160221
"HistoryBufferSize"=dword:000003e7
"NumberOfHistoryBuffers"=dword:00000005
"HistoryNoDup"=dword:00000000
"WindowSize"=dword:00280064


I hope you understand now.


ju.c
 
C

Chavvy

You asked how to import from a reg file so I told you to
use reg.exe.

Now you ask where DOS box defaults are stored which I
already told you in my first reply.

So, again, go to this registry key:

[HKEY_CURRENT_USER\Console]

and find the executable that you want to remotely set.

For example:

To export the command window settings for "contig.exe"
export this key, as shown:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Console\C:_Program Files_Hardware_PowerDefrag_Contig.exe]
"ScreenBufferSize"=dword:09c40064
"WindowPosition"=dword:01160221
"HistoryBufferSize"=dword:000003e7
"NumberOfHistoryBuffers"=dword:00000005
"HistoryNoDup"=dword:00000000
"WindowSize"=dword:00280064

I hope you understand now.

ju.c

Chavvy said:
Thanks again. I am fairly comfortable with the different methods I
have to deploy the change. My issue is still in identifying where
these DOS box defaults are stored, unless I have missed something from
your post.

IW:

Perfect, I now have everything I want and ould have had it earlier if
i had read your post properly. Thansk for your patience. Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top