Ctrl or shift click the new tab button does not use the parent directory as working directory #22468

Open
opened 2026-01-31 08:14:19 +00:00 by claunia · 2 comments
Owner

Originally created by @fireattack on GitHub (Oct 30, 2024).

Windows Terminal version

1.21.2911.0

Windows build number

10.0.19045.5011

Other Software

No response

Steps to reproduce

  1. Set default profile CMD (or PS; but steps below are for CMD).
  2. Set your CMD profile's "Starting directory" to "Use parent process directory".
  3. Open a new window of WT at a non-default directory, say, C:\files\.
  4. In this window, click the drop down button (V) next to new tab button (+), and shift or ctrl click the CMD option to create a new window or an administrator window.
  5. Observe the new window is correctly using C:\files\ as current working dir, as expected.
  6. Back to the original window. Shift or ctrl click the new tab button (+) directly.

Expected Behavior

It should create a new window or a new administrator window with default profile, which should be CMD, so it should create a window using C:\files\ as starting dir just like step 4-5.

Actual Behavior

It creates a window using C:\WINDOWS\system32 as working dir, not parent process dir.

Originally created by @fireattack on GitHub (Oct 30, 2024). ### Windows Terminal version 1.21.2911.0 ### Windows build number 10.0.19045.5011 ### Other Software _No response_ ### Steps to reproduce 0. Set default profile CMD (or PS; but steps below are for CMD). 1. Set your CMD profile's "Starting directory" to "Use parent process directory". 3. Open a new window of WT at a non-default directory, say, `C:\files\`. 4. In this window, click the drop down button (V) next to new tab button (+), and shift or ctrl click the CMD option to create a new window or an administrator window. 5. Observe the new window is correctly using `C:\files\` as current working dir, as expected. 6. Back to the original window. Shift or ctrl click the new tab button (+) directly. ### Expected Behavior It should create a new window or a new administrator window with default profile, which should be CMD, so it should create a window using `C:\files\` as starting dir just like step 4-5. ### Actual Behavior It creates a window using `C:\WINDOWS\system32` as working dir, not parent process dir.
claunia added the Issue-BugNeeds-Tag-FixProduct-Terminal labels 2026-01-31 08:14:19 +00:00
Author
Owner

@similar-issues-ai[bot] commented on GitHub (Oct 30, 2024):

We've found some similar issues:

  • #14817 , similarity score: 85%
  • #14601 , similarity score: 83%
  • #14761 , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@similar-issues-ai[bot] commented on GitHub (Oct 30, 2024): We've found some similar issues: - #14817 , similarity score: 85% - #14601 , similarity score: 83% - #14761 , similarity score: 81% If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue. > Note: You can give me feedback by 👍 or 👎 this comment.
Author
Owner

@fireattack commented on GitHub (Feb 20, 2025):

This bug still exists, but the behavior changed slightly.

Now, doing so (the steps above) will not open new admin window in unexpected, but understandable C:\WINDOWS\system32, but in a random path:

Image

(To be fair, this path is in my %path% environment variables:

Image

But still)
I have no idea why since that path has nothing to do with where the wt.exe or cmd.exe is located.

@fireattack commented on GitHub (Feb 20, 2025): This bug still exists, but the behavior changed slightly. Now, doing so (the steps above) will not open new admin window in unexpected, but understandable `C:\WINDOWS\system32`, but in a random path: ![Image](https://github.com/user-attachments/assets/aaa111b2-de4c-43cd-ae2d-f4759cee2434) (To be fair, this path is in my %path% environment variables: ![Image](https://github.com/user-attachments/assets/870b4344-f856-43fc-82d0-3b814fed030c) But still) I have no idea why since that path has nothing to do with where the wt.exe or cmd.exe is located.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22468