Add a setting to trim out Administrator: if it's the start of the title #15542

Closed
opened 2026-01-31 04:41:30 +00:00 by claunia · 8 comments
Owner

Originally created by @zadjii-msft on GitHub (Oct 13, 2021).

talked with someone internally. They suggested this, it was a good idea.

hot take: on by default. Meshes nice with the shield in #11224.

linking: #5000

Originally created by @zadjii-msft on GitHub (Oct 13, 2021). talked with someone internally. They suggested this, it was a good idea. _hot take_: on by default. Meshes nice with the shield in #11224. linking: #5000
claunia added the Area-SettingsIssue-TaskProduct-TerminalResolution-Won't-Fix labels 2026-01-31 04:41:31 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 13, 2021):

Linking #984!

@DHowett commented on GitHub (Oct 13, 2021): Linking #984!
Author
Owner

@DHowett commented on GitHub (Oct 13, 2021):

(That bug has more commentary and subscribers if you want to re-open it!)

@DHowett commented on GitHub (Oct 13, 2021): (That bug has more commentary and subscribers if you want to re-open it!)
Author
Owner

@zadjii-msft commented on GitHub (Oct 14, 2021):

#984 originally suggested #608 as a solution, but that doesn't work. We decided to implement tabTitle as an initial title, which now cmd will happily regurgitate with the prepended "Administrator:" text. #1320 is also related, but that's

  1. very much more complicated than this simple setting would be, and thus farther away from actually shipping alongside the other QoL improvements
  2. we'd have to come up with a syntax for {title_but_trim_Administrator} and that's annoying
  3. could be combined with this anyways, where this would apply before we fmt::format the actual tab text
@zadjii-msft commented on GitHub (Oct 14, 2021): #984 originally suggested #608 as a solution, but that doesn't work. We decided to implement `tabTitle` as an _initial_ title, which now cmd will happily regurgitate with the prepended "Administrator:" text. #1320 is also related, but that's 1. very much more complicated than this simple setting would be, and thus farther away from actually shipping alongside the other QoL improvements 2. we'd have to come up with a syntax for `{title_but_trim_Administrator}` and that's annoying 3. could be combined with this anyways, where this would apply _before_ we `fmt::format` the actual tab text
Author
Owner

@malxau commented on GitHub (Oct 14, 2021):

Note "Administrator" is a localized string.

Is there a way that CMD can detect it's running under WT and change its behavior? This string was added right at the end of Vista when there wasn't time to do something better - the shield icon that WT now has is the kind of thing we really wanted back then.

@malxau commented on GitHub (Oct 14, 2021): Note "Administrator" is a localized string. Is there a way that CMD can detect it's running under WT and change its behavior? This string was added right at the end of Vista when there wasn't time to do something better - the shield icon that WT now has is the kind of thing we really wanted back then.
Author
Owner

@zadjii-msft commented on GitHub (Oct 14, 2021):

Note "Administrator" is a localized string.

😨

Okay that makes this a lot harder.

Is there a way that CMD can detect it's running under WT and change its behavior?

Officially, no. Unofficially, I've had the hot take that we ship an updated cmdv2.exe in the Terminal package, allowing us to break the compat promise. That's been an extremely hot take though. Pretty sure we can't OSS cmd.exe, so that also complicates things.

@zadjii-msft commented on GitHub (Oct 14, 2021): > Note "Administrator" is a localized string. 😨 Okay that makes this a lot harder. > Is there a way that CMD can detect it's running under WT and change its behavior? Officially, no. Unofficially, I've had the hot take that we ship an updated cmdv2.exe in the Terminal package, allowing us to break the compat promise. That's been an extremely hot take though. Pretty sure we can't OSS cmd.exe, so that also complicates things.
Author
Owner

@trallnag commented on GitHub (Oct 20, 2021):

For PowerShell I came across this command:

$host.ui.RawUI.WindowTitle = “Changed Title”

Source: https://devblogs.microsoft.com/scripting/powertip-change-the-powershell-console-title/

@trallnag commented on GitHub (Oct 20, 2021): For PowerShell I came across this command: $host.ui.RawUI.WindowTitle = “Changed Title” Source: <https://devblogs.microsoft.com/scripting/powertip-change-the-powershell-console-title/>
Author
Owner

@zadjii-msft commented on GitHub (Nov 1, 2021):

I'm closing this one out as rejected, because of the aforementioned localization issue with cmd.exe. I'm 99% sure we won't be able to reverse engineer what that string is, nor will we get our localization to exactly match, since cmd.exe is localized in more languages than the Terminal.

Setting the title with the commandline, or manually with an action, is probably a better solution. Thanks to @malxau for some (all important) historical context here!

@zadjii-msft commented on GitHub (Nov 1, 2021): I'm closing this one out as rejected, because of the aforementioned localization issue with `cmd.exe`. I'm 99% sure we won't be able to reverse engineer what that string is, nor will we get our localization to exactly match, since cmd.exe is localized in more languages than the Terminal. Setting the title with the commandline, or manually with an action, is probably a better solution. Thanks to @malxau for some (all important) historical context here!
Author
Owner

@DHowett commented on GitHub (May 1, 2023):

Making modifications to system files that are under the protection of SFC or are part of the WinSxS store can cause reliability issues and--in particularly bad cases--break Windows Update. I appreciate that you've found a solution (and thank you for sharing it!), but since this is a Microsoft-moderated repository I can't in good conscience direct users to it.

(I wouldn't care so much usually, but we just had a bunch of reports of people being unable to upgrade because they deleted curl.exe from System32.)

@DHowett commented on GitHub (May 1, 2023): Making modifications to system files that are under the protection of SFC or are part of the WinSxS store can cause reliability issues and--in particularly bad cases--break Windows Update. I appreciate that you've found a solution (and thank you for sharing it!), but since this is a Microsoft-moderated repository I can't in good conscience direct users to it. (I wouldn't care so much usually, but we just had a bunch of reports of people being unable to upgrade because they deleted curl.exe from System32.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15542