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
Unable to drag/drop a file to terminal with UAC turned off #11668
Comments
To be very specific - Are you running the Terminal as your local user account, but with admin permissions, or do you have UAC disabled entirely? These are two similar sounding but totally different scenarios unfortunately. |
UAC is disabled. |
To be totally sure I'm doing this right - what's the output of |
`reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ /v enablelua HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System |
Huh okay, that's the situation that I thought I fixed. Weird. |
I can confirm that it isn't fixed in 1.12.2931.0. I disabled UAC and logged on with an administrator account. I verified that the access token of Explorer in this case has high mandatory integrity level and has the administrators group enabled, the same as Terminal. |
IMO, For the elevation check, it only needs to check for the elevation type The function also has a technical bug, but one that's not an issue currently. Using |
FWIW I believe that the implementation in |
Huh, so observation: I don't think we can fix this currently. Seems like the OS straight up disables XAML drag/drop when EnableLUA is set to 0. I'm trying it out with Sticky Notes in a VM, and that's not letting me drag/drop anything into it. I don't think the TermControl is doing anything to suppress the Drag event - it doesn't reject drops when it's elevated: terminal/src/cascadia/TerminalControl/TermControl.cpp Lines 2373 to 2392 in a766798
|
MSFT:35616520 has more context here. Looks like this is going to be an unfortunate "no" for now. We may need to move to a future version of WinAppSDK that might support this, whenever support for elevated drag/drop is added to WASDK. |
Wow, I really don't know what I meant when I said that "1.12 had it wrong in the opposite direction" -- the code is the same, as far as I can tell. The core issue that prevents tab reordering is that we have a process, DataExchangeHost, that is used to render the bitmap attached to the cursor and shuttle data into the receiving process. That process must be running as the same user and at the same IL (I think¹) as Terminal. The two cases where it isn't running as the same user or at the same IL are:
Since we can't detect the identity of the DataExchangeHost, we had to solve for a heuristic . . . so IsElevated was originally designed to handle (1) because we needed to use it to disable drag/drop in case (1). It was probably a mistake to try to generalize it and use it for anything else -- and we may want to rectify that mistake. However, the issue IN THIS THREAD is different. Terminal doesn't directly control what external applications can drag/drop to it -- this is just a platform limitation. We'll need to take it up internally. ¹ Since it's just COM, and it doesn't want to "punch down" at a lower-IL process. I think. |
Oh hey this is actually tracked elsewhere: /dup #6661 |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
@zadjii-msft They are two different problems |
it still not work in version 1.15.3465.0 when UAC disable and reg query with "enablelua REG_DWORD 0x0" |
Windows Terminal version (or Windows build number)
Windows [Version 10.0.22000.282] Terminal [Version 1.12.2931.0]
Other Software
None open at the time
Steps to reproduce
Run windows terminal as administrator.
Try to drag a file/folder into the terminal to copy its path to the terminal window.
Does not work.
Expected Behavior
I expected drag and drop for files/folders into the terminal window to behave the same as a command prompt or powershell window, both behave as expected in non-admin or administrator permission instances of the aforementioned programs.
Actual Behavior
Path does not get copied during drag and drop into the terminal window, I just get the "deny" "not allowed" cursor icon when trying, same problem as #7754 but ticket closed
The text was updated successfully, but these errors were encountered: