Windows Terminal is now default for console apps

Sometimes you just gotta laff. It seems that, as of Windows 11 version 22H2, the default for console apps is now Windows Terminal and not Windows Console. So what? you may ask.

For the vast majority of my work, no problem. I’ve been using Window Terminal as part of the coding side of my life for a while now. However, there is one console app I use a lot – and have done for many many years (old-fashioned, moi?) – which just goes bananas in Windows Terminal: ZTree.

ZTree Screen Shot

ZTree's main display

For those who may not have heard of it, a little bit of history. Back in the DOS days, there used to be a program called XTree, which was a file manager. A file manager that was way better than anything that pure MS-DOS could provide. It did this by providing a character-mode GUI that showed the directory structure on a drive as an expandable tree with other panes showing information about files and so on. It had the ability to even show the file data in a hex formatted display, which sometimes was extremely helpful in the kind of work I was doing at the time.

XTree went through a series of updates and company takeovers until it was retired/abandoned. ZTree was a clone of this app and expanded on its functionality a great deal. To be honest I use it mostly these days for search-related operations on files. It is way faster at this than Windows, plus you can quickly open a file that matches your search string and see how and where the matches occur. With Windows search, you’d have to start up some other app to actually see the data.

Example: recently I was looking through a bunch of projects for some specific usage of a JavaScript function. With ZTree, I open up the Projects folder, scan and tag all subfolders for JS files, and start the search. For every file that’s still tagged, I can open it up in ZTree and quickly view it. With Windows? Slowly (and I mean s-l-o-w-l-y) I’d get a list of files, and for each one I’d have to start up VSCode to look at the contents. Meh.

Anyway, it turns out that ZTree’s display code does not work in Windows Terminal. The display gets scrambled. I initially thought that my ZTree configuration was hosed, but after a bit of dithering around with setting columns/rows, etc, I Googled the issue. And, it turns out that the current version of ZTree needs Windows Console in order to work properly, but the latest version of Windows defaults to Windows Terminal for console apps. A bit more dithering, I worked out that I needed to change the properties on the icon I use to start up ZTree to use the following target:

C:\Windows\System32\conhost.exe C:\ZTreeWin\ZTW64.EXE

Previously it merely had the reference to the ZTree app, but now it explicitly starts up Windows Console and then uses that to start ZTree.

Phew! Back to the familiar character-mode GUI I’ve known for so long!!!

ZTreeScreenShot - banner

Loading similar posts...   Loading links to posts on similar topics...

3 Responses

 avatar
#1 David Taylor said...
04-Oct-24 9:41 PM

Found this on stack overflow. Just launch ztw and follow the directions below to override the default terminal:

Simply go to the Terminal Settings (right mouse click on the window title) and change Default terminal application to Windows Console Host.

 avatar
#2 Pat Gillen said...
12-Nov-24 10:01 PM

Thank you Julian for the conhost fix; all is well again!

 avatar
#3 Eric A. Smith said...
08-Dec-24 4:14 PM

I just replaced my Win10 laptop with one running Win11, and was devastated that I couldn't get ZTree to run properly. Other posts about this problem didn't help, but yours saved the day! I have been using ZTree and it's predecessors (XTree, XTreeGold) for many many years, and use it dozens of times per day. I'm so grateful. The only thing I can't get it to do in Win11 is increase the font size (despite changing it in the ZTree config settings). -Eric

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

  •  Emphasize with italics: surround word with underscores _emphasis_
  •  Emphasize strongly: surround word with double-asterisks **strong**
  •  Link: surround text with square brackets, url with parentheses [text](url)
  •  Inline code: surround text with backticks `IEnumerable`
  •  Unordered list: start each line with an asterisk, space * an item
  •  Ordered list: start each line with a digit, period, space 1. an item
  •  Insert code block: start each line with four spaces
  •  Insert blockquote: start each line with right-angle-bracket, space > Now is the time...
Preview of response