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

Copying icons to %APPDATA% #103

Open
DragRedSim opened this issue Sep 20, 2022 · 1 comment
Open

Copying icons to %APPDATA% #103

DragRedSim opened this issue Sep 20, 2022 · 1 comment

Comments

@DragRedSim
Copy link
Contributor

Hi there,
I've done some digging on how to get the copying to work a bit better, especially in regards from copying from an EFS-encrypted location to a non-encrypted location.
The trick appears to be using the CopyFileExW function, which allows a lot of things; cancelling a copy in progress, progress status callbacks, and most importantly for us, the ability to use some flags to modify its behaviour. The catch is, it needs to be brought in via P/Invoke.
Using the flag COPY_FILE_ALLOW_DECRYPTED_DESTINATION (an enum value resolving to 0x8) will allow the copy to succeed without throwing an error.
Here's the official documentation on this function: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfileexw
Unfortunately, I don't know enough about coding with this functionality to get it cleanly together. I managed to hack together a working version using a decompiler on top of 2.11.0.

@stevealexandre
Copy link
Contributor

stevealexandre commented Sep 20, 2022

Will just read the file as an Image and save it.
More easier to manage and will solve this issue :). (merge inc after tests by other peoples but mine are ok)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants