dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.21k stars 661 forks source link

My program can't open EXE files on a virtual drive #1078

Closed 834772509 closed 2 years ago

834772509 commented 2 years ago

Environment

Check List

Description

My program can't open EXE files on a virtual drive, I'm using Rust, and I've implemented the three methods "create_file" (maybe not perfect?), "read_file", "get_file_information". .txt, .mp4, .jpg, etc. these formats can be read and viewed normally on the virtual drive, but the exe program prompts: "parameter error". I tested Mirror.exe everything works fine, but I don't know what to do to make my program work, maybe there are other ways I need to implement?

Logs

Please attach in separate files: mirror output, library logs and kernel logs. In case of BSOD, please attach minidump or dump analyze output.

Karandra commented 2 years ago

This looks like to be the same issue I had https://github.com/dokan-dev/dokany/issues/650 and this one too https://github.com/dokan-dev/dokany/issues/929.

834772509 commented 2 years ago

This looks like to be the same issue I had #650 and this one too #929.

I found my problem: #463, but "DefaultGetFileSecurity" may not be implemented in "dokan-rust", and I don't know how to get the file's Security.

Liryna commented 2 years ago

DefaultGetFileSecurity is used when the FS or wrapper does not support it. You might want to try to use Procmon to see what request is failing.

~Also dokan-rust only support dokany version 1.5.0.3000. Be sure to use that one.~ My bad you saw it https://github.com/834772509

onexzero commented 2 years ago

I think disabling UAC can solve this.

834772509 commented 2 years ago

The UAC permission is turned off. I checked again and found that the request for ".exe.Manifest" and ".exe.Config" is wrong. can't find them. It may be my problem. Can you tell me how to deal with it? Need to extract from exe file?

onexzero commented 2 years ago

Did you completly disable UAC via registry? EnableLUA =0

834772509 commented 2 years ago

Did you completly disable UAC via registry? EnableLUA =0

Yes, I'm pretty sure I turned off UAC completely.

onexzero commented 2 years ago

Doesn't all exe files run? Or is it just a few exes? In my case some exe's runs with UAC some are not.

834772509 commented 2 years ago

All the exe's in my place can't run normally, but other files are accessed normally, can you help to see my code if you have time? ArchiveMount

onexzero commented 2 years ago

I don't know rust well, but I do not think it will work. Refer mirror sample. File system is not that so simple.

Liryna commented 2 years ago

Half implementation is unlikely to work in most cases. You can use procmon to see what calls are made and see which one are not implemented or just compare with the procmon output of the exe open on NTFS.

834772509 commented 2 years ago

OK, I'll take a look at the reference example again, and I'll study it myself.

Liryna commented 2 years ago

Closing this as it is not a Dokan issue but a user implementation missing the requirements.