Windows – replacing the default console emulator under Windows XP

consoleconsole2windows xp

How can I replace the default program providing console windows under Windows XP?

I know of alternative programs, and I have a shortcut to start cmd.exe in Console2. But now I want console applications to start in Console2 rather than the default console program, even when I have no control over the program that starts the console application. (I.e. a non-console program starts consoleapp.exe, and I can't change it to start Console2 instead, but I still want the application to be started inside a new instance of Console2.)

(Note that I want to replace the console itself, that is, the window in which console (i.e. text mode) applications run. And I must be able to run arbitrary, unmodified console applications: a substitute for a specific console program such as Cmd won't do me any good.)

EDIT: So what I'm after is a CSRSS replacement, which leads to

OT: I want to know when Microsoft is going to make a decent CSRSS replacement. Not being able to adjust the width of a "terminal" by resizing the window is a complete joke.

Go download the ISE already. (It's included in Win7/2008R2.)

But as far as I understand this ISE is an environment for Powershell, not a general console emulator.

Best Answer

I'm an author of ConEmu - Windows console emulator. One of its features is capturing to its tab existing consoles or simple GUI applications. So, after starting console program in standard console (CSRSS/ConHost), you may:

  • In the ConEmu system menu, choose "Attach..." item (Win+G by default) and choose attaching window. If ConEmu was not started, you may optionally start it without creating console/tab on startup:

    C:\Tools\ConEmu.exe /detached
    
  • Or, if applicable, run in the started console the following command (ConEmu\Attach.cmd) which initiates attaching from console side. Note, in that case, ConEmu.exe (GUI) will be started automatically, if not already exists.

    ConEmuC.exe /ATTACH /NOCMD
    
  • There is one more way. I think it doesn't match your requirements, however I'll disclose it. There is a key in the registry, which contents cmd/tcc executes after console startup. While you are starting consoleapp.exe, not cmd.exe, this miss. There is Cmd_Autorun.cmd file in ConEmu distrib to install/uninstall this command.

    [HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
    "AutoRun"="\"<Command to be executed>\"" 
    

There is a tag here, on Superuser.com

UPD. Build 120704. Alternative nonintrusive attach mode for console windows.

ConEmu attach external console dialog

UPD2. Build 121128. It is possible to intercept "creation of console window" from specified (by user) applications, for example explorer.exe,vcexpress.exe. Read more about this intrusive experimental feature.

Related Question