Testing cmd.exe in Windows 11?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
atfon
Posts: 178
Joined: 06 Oct 2017 07:33

Testing cmd.exe in Windows 11?

#1 Post by atfon » 13 Sep 2021 11:51

Has anyone had a chance to do any testing with cmd.exe in Windows 11? I know that only the Insider Preview build is currently available, but the full release of Windows 11 will be available in less than a month:

https://blogs.windows.com/windowsexperi ... october-5/

If anyone has tested, have you found any notable differences in behavior compared to cmd.exe in Windows 10? Thanks.

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Testing cmd.exe in Windows 11?

#2 Post by aGerman » 13 Sep 2021 15:54

I didn't download the Insider Preview. However, don't be afraid that MS did any noticeable update. They leave cmd.exe allone because "changing cmd.exe is our worst nightmare as its compatibility story is among the heaviest of any piece of the operating system" [Michael Niksa].
https://github.com/microsoft/terminal/b ... ksa.md#cmd

(FWIW Don't mix up cmd.exe and the behavior of the console/terminal. The cmd is just a shell application. However, they are working hard to enable console applications (like cmd.exe) to run in Windows Terminal by default, rather than in the console window.)

Steffen

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: Testing cmd.exe in Windows 11?

#3 Post by Squashman » 13 Sep 2021 16:07

aGerman wrote:
13 Sep 2021 15:54
I didn't download the Insider Preview. However, don't be afraid that MS did any noticeable update. They leave cmd.exe allone because "changing cmd.exe is our worst nightmare as its compatibility story is among the heaviest of any piece of the operating system" [Michael Niksa].
https://github.com/microsoft/terminal/b ... ksa.md#cmd

(FWIW Don't mix up cmd.exe and the behavior of the console/terminal. The cmd is just a shell application. However, they are working hard to enable console applications (like cmd.exe) to run in Windows Terminal by default, rather than in the console window.)

Steffen
Love that. I love it when I tell people that batch files still support $25 million in business in my small group. I usually tell that to people who are adamant that you should never use batch files and only use PowerShell.

atfon
Posts: 178
Joined: 06 Oct 2017 07:33

Re: Testing cmd.exe in Windows 11?

#4 Post by atfon » 14 Sep 2021 06:22

I usually tell that to people who are adamant that you should never use batch files and only use PowerShell.
:D

I feel the same way. I've even been known to utilize batch scripts with Intune. I guess I was curious to know if Microsoft fixed any known bugs, added any new commands (I've heard about diskusage.exe that will be available in 10 too), broke anything, etc. I'm sure we'll find out soon enough.

FWIW, there was discussion about this when Windows 10 was released: viewtopic.php?t=5948

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Testing cmd.exe in Windows 11?

#5 Post by aGerman » 14 Sep 2021 10:08

atfon wrote:
14 Sep 2021 06:22
I was curious to know if Microsoft fixed any known bugs
If you read Michael's post, you really shouldn't expect it. They know that all the bugs of cmd and the command tools are already exploited in too many scripts. And here on DosTips are quite some guys who are actively searching for any undefined, unexpected, undocumented, ... behaviors that have the potential to be exploited. Refer to Hyrum's Law.
atfon wrote:
14 Sep 2021 06:22
added any new commands
If we have luck :lol:
atfon wrote:
14 Sep 2021 06:22
FWIW, there was discussion about this when Windows 10 was released: viewtopic.php?t=5948
That's been more about the abilities of the console host (again, not to be confused with cmd.exe or the command tools). Conhost is still updated, but with much lower priority than Windows Terminal.

I don't want to jump on the discussion about what shell should be preferred. However, telling us that cmd.exe isn't updated any longer means that MS is patient enough to let it die slowly rather than force us to use another shell. They just do it indirectly this way.

Steffen

atfon
Posts: 178
Joined: 06 Oct 2017 07:33

Re: Testing cmd.exe in Windows 11?

#6 Post by atfon » 14 Sep 2021 10:24

aGerman wrote:
14 Sep 2021 10:08
atfon wrote:
14 Sep 2021 06:22
FWIW, there was discussion about this when Windows 10 was released: viewtopic.php?t=5948
That's been more about the abilities of the console host (again, not to be confused with cmd.exe or the command tools). Conhost is still updated, but with much lower priority than Windows Terminal.

I don't want to jump on the discussion about what shell should be preferred. However, telling us that cmd.exe isn't updated any longer means that MS is patient enough to let it die slowly rather than force us to use another shell. They just do it indirectly this way.

Steffen
That thread is actually all over the place. In addition to discussions about the console host, there is also discussion of new commands, bug fixes, new environment variables, etc. I guess we'll learn a bit more once more people get a chance to work with it.

jfl
Posts: 226
Joined: 26 Oct 2012 06:40
Location: Saint Hilaire du Touvet, France
Contact:

Re: Testing cmd.exe in Windows 11?

#7 Post by jfl » 15 Sep 2021 08:58

I totally agree with aGerman, they won't risk breaking anything.

Just in case, I gave it a try on a VM with the latest preview of Windows 11. 8)
The good news is that my Batch debug library works just fine. (albeit unbearably slowly in that VM).
As it uses all sorts of undocumented tricks published on this forum, I can safely say that nothing has changed. :)

Side note: The user interface is indeed much more friendly.
But so little has changed in the kernel, that both cmd and PowerShell still think it's Windows 10 :lol:

atfon
Posts: 178
Joined: 06 Oct 2017 07:33

Re: Testing cmd.exe in Windows 11?

#8 Post by atfon » 15 Sep 2021 10:32

jfl wrote:
15 Sep 2021 08:58
As it uses all sorts of undocumented tricks published on this forum, I can safely say that nothing has changed. :)
Thank you, Jean-François. That's great news!

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Testing cmd.exe in Windows 11?

#9 Post by aGerman » 05 Oct 2021 15:22

Maybe a little off topic because in terms of the cmd I didn't observe any changed behavior yet. Just a first impression:

It's a face lift. MS called it Windows 11, I call it Fall Creators Update II electric boogaloo. The version number isn't 11.0, not even 10.1 but still 10.0. The build number increased like with any other Win 10 update in the past. I guess this already tells us something. "Face lift" because the UI got a new coating. Round window corners and centered task bar are things that I don't mind (as long as I don't have to pay for things that I don't care and as long as the rendition of useless visual effects doesn't wreck the performance). Menus are cumbersome for my taste. You need two steps to get to the app list in the start menu, and you need two steps to get to the usual item list in context menus. However, under the hood is still the good ol' Win 10 if you ask me. I just ironed Win 11 over Win 10 with this upgrade. All programs are still there and working. Even the update history of the my Win 10 installation ist still there. I'm wondering if I'll receive further Win 10 updates just because they are compatible with Win 11 :lol:

Steffen

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Testing cmd.exe in Windows 11?

#10 Post by aGerman » 23 Oct 2021 07:19

The console host now supports double-height and double-width text (... while Windows Terminal does NOT :?).
(//EDIT: Based on what I've read in the belonging PR it's not been meant to get implemented into Windows Terminal for performance reasons, and due to missing conpty support.)

Code: Select all

@echo off &setlocal
for /f %%i in ('echo prompt $E^|cmd') do set "ESC=%%i"

:: first half
echo %ESC%#3Double Height (implies Double Width)
:: second half
echo %ESC%#4Double Height (implies Double Width)

echo %ESC%#6Double Width only

pause
double-height-width.png
double-height-width.png (15.09 KiB) Viewed 6724 times

Post Reply