2

I'm currently using Windows 11. I often use Alt-Tab to go back and forth between windows. I have Command Prompt pinned to my taskbar. When I click on it, it opens a new command prompt. However, if I press Alt-Tab twice after opening a new command prompt, I don't get back to the command prompt.

Upon further inspection, it looks as though command prompt windows that are opened using the task bar become the last window on Alt-Tab. That is, if I open a command prompt and press Alt-Tab afterwards, I need to press Shift-Alt-Tab in order to return to the command prompt I just had open.

Even more odd, this does not happen if I open up Command Prompt by using the search bar in the task bar. It's only from clicking on the pinned Command Prompt app that this odd behavior occurs with.

I'm also not using any weird shortcuts or links. I just removed the pinned Command Prompt app from the task bar, right-clicked on the Command Prompt app from the search menu (on the task bar), and re-pinned that exact app. Again, the pinned version acts weird (as described above), while opening the non-pinned version from the search works exactly as expected.

How can I get the pinned command prompt to work with the task switcher correctly?

1 Answer 1

2

I think I've worked out at least how to predict the behaviour. I've found that it's determined by the setting in Privacy & Security/For Developers.

If it's set to Let windows decide or Windows Terminal, running cmd actually launches terminal, and it has the odd Alt + Tab behaviour.

If it's set to Windows console host, running cmd launches cmd, and Alt + Tab behaves normally. Also, running terminal behaves normally too.

The problem only occurs when it's set to launch terminal instead of cmd. I'm guessing that Let windows decide changed from cmd to terminal at some stage, and people started seeing this behaviour.

My solution is to pin terminal to the taskbar and start menu. Then I can have the tabbed interface and Alt + Tab will work normally. I could also launch terminal by searching for it instead of using cmd like I've been doing for I don't know how long.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .