Console Window Host (conhost.exe)

  As a programmer, you must have come across conhost.exe (Console Window Host) – most likely in the Task Manager. Perhaps you even know what it is and what it does. If you don’t know much about this program, you must read this article. Here, we’ll tell you all you need to know about Console Window Host and its functions.



Console Window Host – Introduction

  The Console Window Host is a program that resides in the System32 directory of Windows 7, 8 and 10 and is used to host Console Windows. You might be wondering why this program didn’t exist in earlier versions of Windows, such as Windows XP or Vista. Here’s why – This program was created in Windows 7 for fixing a fundamental problem in the way console windows were handled by previous versions of Windows.

A bit of History

  If you look at the Command Prompt Window in Windows XP, you’ll find that it did not use the active theme. It was so because csrss.exe (Client Server Runtime Sub System) was used to host console windows in XP and older versions of Windows. And csrss.exe didn’t possess the ability to use the active theme. Why didn’t csrss.exe support themes? – Due to security concerns. Read more about this issue here.

  Windows Vista tried to fix this problem by using the Desktop Window Manager (dwm.exe) to draw the console window. Therefore, the title bar and the rest of the “boundary” of the console window were able to use the active theme. However, the internal part of the console window still failed to do so, it looked like the old, classic-style scroll bars. Also, this approach of Windows Vista broke the ability to drag and drop files from the Explorer into the command prompt. It didn’t work because of security issues involved with the csrss.exe (which uses System privileges).



And then came Windows 7

  Windows 7 introduced a new approach to this problem. In Windows 7, a new program i.e. the Console Window Host was introduced and it fixed all these problems. The Console Window Host lets the console windows use the active theme apart from making drag and drop work well. And this results in the beautiful Command Prompt you see below :

Console Window Host

Console Window Host

  As you can see in the above image, the Command Prompt Window now looks like other Windows programs (in terms of Window appearance, scroll bars etc.). All this fuss about changing the appearance of console windows! – you might say. It might appear to be a trivial thing for a person who rarely uses the command prompt. But for programmers and power users, it is very significant. Can you imagine yourself looking at a Windows 2000-style command prompt in a Windows 7 (or 8 or 10) computer? It would look very ugly, not to mention very unaesthetic as well.

How does it work?

  In simple terms, the Console Window Host works “between” cmd.exe and csrss.exe. It handles the appearance of the console window, while the csrss.exe handles the actual tasks performed by cmd.exe.

  The Console Window Host appears in the Task Manager whenever you open the Command Prompt or run a Console Application. It can also be found in the Task Manager when you’re not actively using the Command Prompt i.e. it can be invoked by other applications.



Console Window Host – A Virus?

  Many Windows users say that their Task Manager is showing a process named conhost.exe and is running from a location other than System32, such as the AppData folder. Security experts say that in such cases, it is malware pretending to be a genuine program. Personally, I have never encountered such an instance on any of my computers. In fact, if you use the appropriate antivirus software on your computer and take other precautions, there’s little you’ll ever run into such a problem.

Conclusion

  We hope you now understand what Console Window Host is and what it does. If this article helped you, you must help others by sharing it.

(Visited 771 times, 1 visits today)

7 comments

Leave a Reply

Your email address will not be published. Required fields are marked *