-
Notifications
You must be signed in to change notification settings - Fork 84
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
[FR] Prompt for UAC elevation instead of throwing "Access is denied" error? #95
Comments
The unique way to do that's it's restart whole Ultracopier (whole process manager all copy). Include with separated process mean close the current copy in process, it's not a solution. The root problem is the named pipe, in case of privilege elevation, windows detect privilege change and close the process by security. |
Yes, but it seems like the simplest solution, doesn't it? Especially if UC can differentiate between non-privileged and privileged transfers, it could finish all non-privileged transfers and then prompt to restart UC with elevation. Another possible option: Could UC redirect just the privileged transfer back to the default Windows copy/move API, and let Windows handle elevation? The third option, which I suspect would be the most complicated to implement, but also the most effective: UC could spawn an elevated child-process that can exist alongside the normal UC process. This child-process would handle the privileged transfers in parallel with UC's handling of any non-privileged transfers. Implementing ANY of these options seems better than the current situation, where the transfer simply fails and provided no option to reattempt it... |
For the first option, it's like open UC as admin and do manually the copy, mostly of the users had generated problem because:
No
Windows not allow communication between normal user and privileged process |
I must trust that you know more about it than I do. I would have guessed that there are plenty of situations where an unelevated process must pass commands to an elevated one. I don't know enough about the code used by UC to know if any of these solutions are relevant. I could even imagine a solution where the instructions for the transfer that requires elevation is written to a temporary program file, which the privileged child-process reads and executes. |
On Windows, if Ultracopier cannot complete a transfer because it lacks administrator privileges, the current behavior is to cancel the transfer and throw an error message: "Access is denied."
Instead, would it be possible to trigger a relaunch of Ultracopier with elevated privileges (i.e. which will usually require UAC confirmation), and then perform the transfer using the elevated instance?
(Ideally, the elevated Ultracopier instance would execute only that particular transfer, then kill the elevated process and resume the non-elevated instance. This way, elevation would be requested on a case-by-case basis and wouldn't be persistent, which would be vulnerable to abuse.)
The text was updated successfully, but these errors were encountered: