-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Feature: Added support for elevated file operations #13043
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
Conversation
src/Files.App/Utils/Storage/Operations/ShellFilesystemOperations.cs
Outdated
Show resolved
Hide resolved
Should we notify the user beforehand that it won't be available? Alternatively, would it be easy to display File Explorers transfer UI in this case? |
Wait I'm feeling like an idiot. Lemme try one thing. |
Ook realized there was a better way to do this. No need for a separate process and still get progress, undo/redo and error reporting :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@gave92 Thank you for working on this, it's has been a pain point since migrating to WinAppSdk and I know a lot of people are going to be very happy it's resolved. |
Is it just me or does this thing not work anymore? :/ Even checking out this PR admin operations fail. |
It prompts for access but then fails to do the operation. |
Uff was it a change in windows then? Could swear it was working grr. |
I know it was working, I tested before merging 😄 |
Confirmed: "KB5028185 Windows 11 Cumulative Update Build 22621.1992" breaks admin file operations for packaged apps. Just tried to go back to build 22621.1848 and tadaaa admin operations work again 😢. @yaira2 do you think we can notify anyone about this? |
Is there an issue or post from Microsoft about this regression? |
None that I can find. Not sure where we'd file such a bug report. Maybe we could ask in the "winui" channel of "UWP Community" on discord? |
I can't reproduce this on |
Thanks! But note that the issue is only with Packaged apps. For un-packaged apps it still works. |
This comment was marked as outdated.
This comment was marked as outdated.
Still can't reproduce this issue outside of Files, there's certainly no indication of an OS issue. Maybe there's a Files threading issue at play here? |
Will send repro app, thanks for checking. Could you also share the code you're using to repro?
Can you repro for Packaged apps then? |
No, sorry for the confusion. When I posted that comment, my app was running in lowIL due to a manifest typo (that interestingly enough didn't cause an error). I since fixed that and now cannot reproduce. Latest compiled sample: packaged_app.zip |
When I run it in debug, it appears that the file operation has been processed before the UAC prompt appears and fails with an authorization error. |
Given that it used to work, this looks like an MS bug. I'm not sure we can fix it :( |
I know it used to work too. |
It's annoying to miss out admin ops in v3 :( I'm tempted to take commit 7ad5f78 up again. It uses a different method and should work. It has limitiations:
But it's better than nothing? |
Yeah but it's more annoying that admin ops fail even though clicking on the shield icon.
I'd like to try that too. |
It still works occasionally, @riverar suggested it could be a threading issue which would explain why it's on and off. |
Really? I have no success even if I have disabled UAC. Anyway, I think this is a blocker to release v3. |
Resolved / Related Issues
Closes Feature: Implement support for elevated operations #10422
Validation
How did you test these changes?
This PR (re)adds basic support for performing file operations as admin using a separate process. This is meant as a stopgap while we wait for a fix to microsoft/WindowsAppSDK#3092.
To keep things simple: no progress, no cancellation, no undo/redo,
no error feedback.Screenshots (optional)
