Skip to content
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

Cannot drag and drop into ELEVATED Terminal to get the path of a file #7343

Closed
su-hy opened this issue Aug 19, 2020 · 3 comments
Closed

Cannot drag and drop into ELEVATED Terminal to get the path of a file #7343

su-hy opened this issue Aug 19, 2020 · 3 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase

Comments

@su-hy
Copy link

su-hy commented Aug 19, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.959]
Windows Terminal version (if applicable):  1.1.2233.0 and preview  1.1.2233.0

Any other software?

Steps to reproduce

I drag a file from Windows Explorer onto Terminal window and it does nothing. In CMD or Powershell windows it gives me a path to file.

Expected behavior

I expect to get a path to the file. I looked around and see that this is what should be happening, but it is not for me.

Actual behavior

See the GIF below:
windows_terminal

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 19, 2020
@zadjii-msft zadjii-msft changed the title Cannot drag and drop into Windows terminal to get the path of a file Cannot drag and drop into ELEVATED Terminal to get the path of a file Aug 19, 2020
@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. labels Aug 19, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 19, 2020
@zadjii-msft
Copy link
Member

Huh, good find! As it turns out, drag/dropping onto an elevated window isn't supported at all. This is a platform security feature. You can notice the same behavior by trying to drag/drop a file onto an elevated conhost.exe (the vintage console). I'd also expect that there's no way for us to get around that, because the drag/drop service runs unelevated, so I don't think it's possible for it to be able to send messages to elevated windows at all.

Thanks for the investigation!

@zadjii-msft zadjii-msft added Resolution-External For issues that are outside this codebase and removed Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) labels Aug 19, 2020
@su-hy
Copy link
Author

su-hy commented Aug 19, 2020

Interesting. I tried it on another account and indeed, it works fine when I open Terminal in a regular way, and it does not work if I "Open as Administrator".
The problem I had was that the first account I used opened Terminal as Administrator by default. Both those accounts are domain admins, but I guess there must be some difference between them.
Thanks.

Also, as you can see on my original GIF, it worked fine in CMD.exe and Powershell prompt. A bit confusing.

@dpmaycry
Copy link

Windows 10 2004 19041.572
Windows Terminal v1.3.2651.0
I am administrator and while my powershell and cmd works fine with drag file path, windows terminal still got the same problem.

@miniksa miniksa removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Dec 7, 2021
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-External For issues that are outside this codebase
Projects
None yet
Development

No branches or pull requests

4 participants