Command Prompt Window Defaults - Programatically?

  • Thread starter Thread starter Chavvy
  • Start date Start date
C

Chavvy

Guest
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?
 
Re: Command Prompt Window Defaults - Programatically?


"Chavvy" <i_p_w_uk@yahoo.co.uk> wrote in message
news:52f1ad85-4825-4afa-9587-ab03ef48ce8a@34g2000hsh.googlegroups.com...
>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).
 
Re: Command Prompt Window Defaults - Programatically?

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?
 
Re: Command Prompt Window Defaults - Programatically?


"Chavvy" <i_p_w_uk@yahoo.co.uk> wrote in message
news:5cf7bf67-33a3-4c03-8f7a-9bfdabcd4df3@17g2000hsk.googlegroups.com...
> 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.
 
Re: Command Prompt Window Defaults - Programatically?

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


"Chavvy" <i_p_w_uk@yahoo.co.uk> wrote in message news:52f1ad85-4825-4afa-9587-ab03ef48ce8a@34g2000hsh.googlegroups.com...
> 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?
 
Re: Command Prompt Window Defaults - Programatically?

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.
 
Re: Command Prompt Window Defaults - Programatically?

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


"Chavvy" <i_p_w_uk@yahoo.co.uk> wrote in message news:a17711c3-2ca0-4138-9d86-64114c0703c9@d1g2000hsg.googlegroups.com...
> 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.
 
Re: Command Prompt Window Defaults - Programatically?

On Oct 5, 12:02 pm, "ju.c" <bibidybubidyb...@mailnator.com> wrote:
> 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
>
> "Chavvy" <i_p_w...@yahoo.co.uk> wrote in messagenews:a17711c3-2ca0-4138-9d86-64114c0703c9@d1g2000hsg.googlegroups.com...
> > 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.


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
 
Re: Command Prompt Window Defaults - Programatically?

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" <i_p_w_uk@yahoo.co.uk> wrote in message news:2f93194f-4341-422d-b841-b62634a661e7@y71g2000hsa.googlegroups.com...
> On Oct 5, 12:02 pm, "ju.c" <bibidybubidyb...@mailnator.com> wrote:
>> 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
>>
>> "Chavvy" <i_p_w...@yahoo.co.uk> wrote in messagenews:a17711c3-2ca0-4138-9d86-64114c0703c9@d1g2000hsg.googlegroups.com...
>> > 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.

>
> 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
 
Re: Command Prompt Window Defaults - Programatically?

On Oct 6, 12:15 pm, "ju.c" <bibidybubidyb...@mailnator.com> wrote:
> 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" <i_p_w...@yahoo.co.uk> wrote in messagenews:2f93194f-4341-422d-b841-b62634a661e7@y71g2000hsa.googlegroups.com...
> > On Oct 5, 12:02 pm, "ju.c" <bibidybubidyb...@mailnator.com> wrote:
> >> 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

>
> >> "Chavvy" <i_p_w...@yahoo.co.uk> wrote in messagenews:a17711c3-2ca0-4138-9d86-64114c0703c9@d1g2000hsg.googlegroups.com...
> >> > 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.

>
> > 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


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.
 
Back
Top