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

Files is running as administrator - Due to platform limitations, drag and drop isn't available when running Files as administrator. #14498

Closed
MATTPASSIONFORTECH opened this issue Jan 20, 2024 · 25 comments
Labels
needs - additional info Needs more information from the reporter

Comments

@MATTPASSIONFORTECH
Copy link

Description

"I keep getting an error message whenever I try to open Files on my computer. This is preventing me from being able to drag and drop files, and it's becoming quite frustrating. Does anyone know of a workaround or a way to fix this bug? I want to find a solution to fix this issue. Keep in mind that using the Microsoft Store version of Files. Update: The same issues occur with Files Stable (Classic installer).

Steps To Reproduce

How do I fix this?

Requirements

  • e.g. Fix crash that occurs when...

Files Version

3.1.1.0

Windows Version

23H2 22631.3078

Log File

Files.bug.mp4
@Josh65-2201
Copy link
Member

Thanks for the report. Make sure UAC (User Account Control) is not set to never notify.

@Josh65-2201 Josh65-2201 added the needs - additional info Needs more information from the reporter label Jan 20, 2024
@yaira2
Copy link
Member

yaira2 commented Jan 24, 2024

Thank you for your feedback, this is a limitation in WinAppSdk where drag & drop causes a crash when the app is running as admin. You can work around this limitation by re-enabling UAC on your device.

@yaira2 yaira2 closed this as completed Jan 24, 2024
@ThisIsDelicious
Copy link

Thank you for your feedback, this is a limitation in WinAppSdk where drag & drop causes a crash when the app is running as admin. You can work around this limitation by re-enabling UAC on your device.

There has to be a better way to prevent Files from running as Administrator. Enabling UAC is quite extreme. I'm still looking for a solution.

@Josh65-2201
Copy link
Member

There isn't, With UAC off Windows will open everything as admin, same as if you right clicked > run as admin

@ThisIsDelicious
Copy link

There isn't, With UAC off Windows will open everything as admin, same as if you right clicked > run as admin

That's unfortunate. Thanks for the info, I wasn't aware.

@yaira2
Copy link
Member

yaira2 commented May 1, 2024

Microsoft recently announced they are working on a fix for drag and dropping tabs. This is certainly a step in the right direction, and it gives us hope that it will be fixed for other drag & drop scenarios as well.

@Iomegan
Copy link

Iomegan commented Nov 4, 2024

Months have passed, but looks like the bug still persists. :(

@0x5bfa
Copy link
Member

0x5bfa commented Nov 4, 2024

FWIW, when your user account is part of Administrators group (it's by default from OOBE) and UAC is completely disabled, a certain Windows drag and drop handler still misunderstands that the app is running as privileged process token.

We already worked on the preparation to be able to enjoy that fix/update Microsoft made but there's an increase crash in that version and we're waiting for further updates. I think it's almost there.

@gigend
Copy link

gigend commented Feb 5, 2025

my windows is always as admin, any suggestion without enabling the UAC?

@Josh65-2201
Copy link
Member

There isn't right now #14498 (comment)

@minh-tonny
Copy link

I’m also encountering the same error as the original poster. Can someone guide me on how to fix it? I’ve customized the UAC as shown in the image (attached). Thank you!

Image
Image

@0x5bfa
Copy link
Member

0x5bfa commented Mar 4, 2025

How did you create the current user? Is it from the installation?

@minh-tonny
Copy link

Yes, I ghosted it from a Windows image, so it's already available.

@0x5bfa
Copy link
Member

0x5bfa commented Mar 4, 2025

That is weird, I was wondering if you enabled Built-in Administrator, which is not a standard admin user but a super user, but apparently you didn't have it enabled and use it.

However, we check whether Files running as admin in the very appropriate way.


Can you check:

  • if it fixes after restarting?
  • how Windows Terminal shows when you only launch it, does it have a shield icon at the left top?

@minh-tonny
Copy link

Thank you for your response. I have thoroughly investigated the Built-in Administrator account.

  1. Status of the Built-in Administrator Account:
    • I confirmed the status using the net user Administrator command in Command Prompt, and it shows "Account active: Yes" and "Password required: Yes,"
    • I also checked the account properties in lusrmgr.msc, where the "Account is disabled" checkbox is not checked, confirming the account is enabled.
  2. I tested Windows Terminal, and I noticed the following:
  • When I launch Windows Terminal normally (left-click) in my standard admin account, it does not show a shield icon, which is expected as it runs without Administrator privileges.
  • However, when I launch Windows Terminal with Administrator privileges (right-click > Run as Administrator), the shield icon still does not appear (it remains colorless or is not visible at all).

Image

@Josh65-2201
Copy link
Member

The terminal image shows that your are running it as admin and on the built in Admin account. This account isn't supported and shouldn't be used, you will have to make a new normal account and switch to that if you want to use drag and drop.

@yaira2
Copy link
Member

yaira2 commented Mar 4, 2025

@minh-tonny unfortunately due to limitations with WinAppSdk, drag & drop isn't supported on the built-in admin account. We're hopeful that this limitation will be removed in the future, but in the meantime, we suggest creating a new Windows account as a workaround.

@0x5bfa
Copy link
Member

0x5bfa commented Mar 4, 2025

@minh-tonny Wait is that screenshot when you run it as admin?

@minh-tonny
Copy link

@0x5bfa Yes, it's true that I took a screenshot in admin mode.

@minh-tonny
Copy link

@yaira2 @Josh65-2201 Thank you very much

@minh-tonny
Copy link

@yaira2 @Josh65-2201 Can I create an account with administator rights, or is it just a standard account?

@Josh65-2201
Copy link
Member

You can use an account that has admin access

@0x5bfa
Copy link
Member

0x5bfa commented Mar 4, 2025

@minh-tonny

  • Can you check Task Manager > Details > Add a column for Elevated > see if files.exe has No.
  • Also check if you enter whoami /groups on command prompt and BUILTIN \Administrators says "Group used for deny only"?

#16897
I have tried the following steps to resolve the issue: running Files App without Administrator privileges, ..., but the problem persists.

it's pretty weird that that dialog pops up even if you didn't elevate Files.

@minh-tonny
Copy link

C

Image
Image
Image

ould everyone please guide me on how to create a user account? When I go to Settings / Accounts / Other Users / Add Account, a dialog box titled 'Local User and Group (local)' appears.

@Josh65-2201
Copy link
Member

Josh65-2201 commented Mar 4, 2025

Right click Users > New User > Enter name > OK > Close. If you want to add it to the admin group you can do that through the Other users page in Windows Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs - additional info Needs more information from the reporter
Projects
None yet
Development

No branches or pull requests

8 participants