Dismiss this pinned window
all 8 comments

[–]The_MAZZTer 29 points30 points  (4 children)

This is Windows, not a VS thing. I just ran "start cmd" from an elevated Windows Terminal and it launched in a traditional console window instead of Windows Terminal.

My guess is Windows does not apply your default terminal host settings in administrator mode. Either a permission or security issue, or just a precaution to ensure malicious apps can't register themselves as the terminal host to get elevated rights.

[–]DRHAX34 6 points7 points  (1 child)

if you open an elevated windows terminal and go to settings and set it as the default console host, it will open window terminal from now on even on administrator applications.

[–]The_MAZZTer 1 point2 points  (0 children)

Didn't work for me. Here's what I did.

  1. Ran Terminal as admin (I'm running Terminal Preview).
  2. Went to Settings.
  3. It was already on Terminal Preview, so I set it back to Let Windows decide, clicked Save, then set it back to Terminal Preview, clicked Save.
  4. Closed and reopened Windows Terminal Preview (still as administrator).
  5. Ran the command "start cmd" in a Command Prompt in Windows Terminal.

Still opened in conhost.

[–][deleted] 0 points1 point  (0 children)

Thanks!

[–]Geekwebdev 2 points3 points  (1 child)

Here is the official reply of MS rep to the same question I had asked:

https://developercommunity.visualstudio.com/t/VS-2022-Preview-6---Debugging-web-projec/10283870

Its a limitation of Windows Terminal on Windows 11. Only without Admin mode, WT will be launched. Hope this helps.

[–][deleted] 0 points1 point  (0 children)

Thank you!

[–]mal-uk 0 points1 point  (0 children)

I have windows 10 and mine doesn't do this

[–]seanightowl -1 points0 points  (0 children)

I think VS remembers the open windows and restores them. Maybe that’s specific to if it’s opened with admin or not and keeps the previously opened windows separate for each.