dokan-dev / dokan-dotnet

Dokan DotNet Wrapper
http://dokan-dev.github.io
MIT License
462 stars 116 forks source link

Can't assign a drive letter or mount point #255

Closed ordinaryorange closed 4 years ago

ordinaryorange commented 4 years ago

Trying to mount as an NTFS folder but I'm getting the error per the title. If I use a drive letter e.g. M the mount occurs without error. Tried the mount.exe sample application that comes with Dokan, but it also throw error "Cant assign a drive letter" when a directory is specified. Running on Windows 10.0.018362

Ideas ?

Liryna commented 4 years ago

Hi @ordinaryorange ,

How does your mount path / options looks like ?

ordinaryorange commented 4 years ago

Tests with mount.exe from Dokan installer ("mount" directory confirmed as not present on machine before execution)

mirror /r c:\users /l c:\mount
mirror /r c:\users\ /l c:\mount
mirror /r c:\users /l c:\mount\
mirror /r c:\users\ /l c:\mount\

All the above fail with the error "Cant assign a drive letter"

This works mirror /r c:\users /l x:

Also tried with the DokanNetMirror sample, changing only lines 23 and 27 The stdout produces

Using unsafe methods: False 04/07/2020 10:57:16 - [DokanNet] GetVolumeInformationProxy: 04/07/2020 10:57:16 - [DokanNet] Context {, False, False, False, False, #4, False, False} 04/07/2020 10:57:16 - [Mirror] GetVolumeInformation('', {, False, False, False, False, #4, False, False}, out DOKAN, out CaseSensitiveSearch, CasePreservedNames, UnicodeOnDisk, PersistentAcls, SupportsRemoteStorage, out NTFS) -> Success 04/07/2020 10:57:16 - [DokanNet] VolumeNameBuffer DOKAN 04/07/2020 10:57:16 - [DokanNet] FileSystemNameBuffer NTFS 04/07/2020 10:57:17 - [DokanNet] VolumeSerialNumber 4094363 04/07/2020 10:57:17 - [DokanNet] FileSystemFlags CaseSensitiveSearch, CasePreservedNames, UnicodeOnDisk, PersistentAcls, SupportsRemoteStorage 04/07/2020 10:57:17 - [DokanNet] MaximumComponentLength 256 04/07/2020 10:57:17 - [DokanNet] GetVolumeInformationProxy Return : Success Error: Can't assign a drive letter or mount point

Liryna commented 4 years ago

@ordinaryorange Let's try to make it work with the C mirror first. Can you provide the output if mirror.exe /r C:\users /l C:\mount /d /s?

Be sure the mount folder already exist and the user running the command has access to it.

ordinaryorange commented 4 years ago

Hi @Liryna, problem solved. Issue was me.

I had made the assumption that the mount path should not exist, and that Dokan would create it. But your last comment indicates that the mount folder should exist. When I created the c:\mount folder and then ran Dokan, it all worked perfectly.

Thank you for you assistance.