dokany
dokany copied to clipboard
Ability to Mount only UNC without Drive
Is there way to mount a filesystem without a drive/drive-letter? I'd like to do something like:
mirror.exe /r C:\MyFiles\ /u \localhost\myfs
where no drive letter is assigned - i.e. you can only access it via \\localhost\myfs
instead of H:\
. I think that's what this question was asking about, but I unable to determine if that's possible and I just haven't discovered how, or if it's not currently possible.
Environment
- Windows version: Windows 10, 1909
- Processor architecture: x64
- Dokany version: 1.3.1.10000
- Library type (Dokany/FUSE): Dokany
Check List
- [X] I checked my issue doesn't exist yet
- [X] My issue is valid with mirror default sample and not specific to my user-mode driver implementation
- [X] I can always reproduce the issue with the provided description below.
- [X] I have updated Dokany to the latest version and have reboot my computer after.
- [ ] I tested one of the last snapshot from appveyor CI
Description
@zastrowm Hi,
Unfortunately that is not currently the case. Could you explain your case not want at all having the drive visible?
I have an application that discovers devices dynamically while it is open; if a device requires a password, the application prompts the user. While it's up, I'd like to be able to allow the user to browse the file systems of the device, using the open file dialog (for instance) or just windows explorer.
In general, I'd rather the user not have drives appear and disappear as the application launches.
You can make the filesystem only usable from specific applications by filtering processid during CreateFile and return access denied when appropriate. The device will be visible but not accessible.
Yep - it's specifically the making the device visible that I'm trying to avoid.
Is it worth filing a feature request for it, or is this something that isn't even possible?
@zastrowm It is always good to have all the possibilities but I have doubt technically. It would need to mount a drive without having symbolic link with driver letter but still have the network redirector providing the full device path.
You can create the feature but it will not be a priority for now unless a good number of people are interested in it or a pull request <3
@adropit @zastrowm by default the mirror has M as MountPoint if /l
is not specified.
https://github.com/dokan-dev/dokany/blob/master/samples/dokan_mirror/mirror.c#L77
Have you tried to call the mirror with /l ""
like mirror.exe /r C:\MyFiles\ /l "" /u \localhost\myfs
https://github.com/dokan-dev/dokany/blob/master/samples/dokan_mirror/mirror.c#L1580-L1581
If it do not work, try to change the mirror to force an empty value.
Looking at the code only the mirror is doing a check to force MountPoint usage. Even if I believe you might get some issue later but lets start little by little.