-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Targeting current instance with "-w 0" command line doesn't work if running as administrator #9628
Comments
Weird, because I definitely can't repro this locally. @miniksa Do you know if there's a way I could have @DJackman123 here collect the events emitted to a particular tracelogging GUID and send them to me? That is what all that logging is for after all |
Right, this is when you run |
@zadjii-msft, you could ensure that the GUID you're thinking about is listed in |
I've got a version of that file laying around that has Terminal GUIDs in it... Just a sec 😄 |
Dude. Put that in a PR and check that in. |
Playing around with this a bit more, I'm seeing this behavior:
1. Start WT from the Start menu as administrator
2. Run: wt -w 0 nt
3. This opens a new instance of WT. It is also running elevated.
4. In the new instance, run: wt -w 0 nt
5. This does not open a new instance of WT, but correctly creates a new tab in the current instance (opened in step 3).
So it's not the fact that it's elevated that is causing the problem. It's something else around how it's launched from the Start menu? But when I launch WT non-elevated from the Start menu it works correctly in the first instance.
|
huh. I don't love the implications that has on our activation stack. Hey, are you getting a different config file when you run from the Run dialog? |
What specifically do you mean by "different config file"? |
If you open the Settings file in both the first window that opens, and the second window (the one the subsequent |
Yes, it appears they are using the same settings file.
|
I'm glad I finally found this issue. I see the same behavior on 1.8.1521.0 in Windows 10 21H1. Running |
So it's not just me? I'm not going crazy?? |
I concur. In my existing, elevated, Windows Terminal instance, when I run |
It's been a few months. Any chance this one can get some love? Have you had a chance to look at the trace that I sent before?
..David..
|
@DJackman123 comment on other thread brought me here.. Yes i can confirm that if the first time terminal is launched with elevated privilege(i.,e Run As administrator) and you issue |
Huh. Nothing is throwing any errors in this trace. Nothing is obviously wrong (other than the second window being established as the monarch).
Because that second process effectively sniped the |
Filed MSFT:39320463 to track. From the mail thread, this doesn't seem like our fault, but we should still figure it out. |
Confirmed. Actually, I have 3 windows open. Two are elevated, and one is not. ALL THREE indicate "Window: 1" in response to the Identify Window command from the command palette. I can confirm that the trick of running So, I guess the workaround will be to immediately issue a Interestingly, I see that doing a edit: I just reproduced this on a second machine. |
Okay we got some heavy investigative help on this on. From the internal bug notes:
There's an upstream bug, MSFT:39730477 that this was now duped to. Major thanks to @jsidewhite and @brialmsft for digging in on the COM side of things |
Windows Terminal version (or Windows build number)
1.7.572.0
Other Software
No response
Steps to reproduce
Launch Windows Terminal as administrator
Run the command line: wt -w 0 nt
Expected Behavior
This should open a new tab in the current window
Actual Behavior
Launches a new instance of Windows Terminal
It would make sense that I wouldn't be able to send commands to other WT windows that were running as admin, but running a command specifically targeting the current window should still work (as a special case if necessary).
The text was updated successfully, but these errors were encountered: