-
Feature request can skip this form. Bug report must complete it. Environment
Check List
DescriptionWhen setting CurrentSession when mounting and mounting to Z: using UncPath, These GUID keys are not deleted when unmounting. Even if I try to delete it, I can't force it because I don't know the related GUID. What are these GUID keys and why are they created? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Dokan does not directly write something in |
Beta Was this translation helpful? Give feedback.
-
Rebooting did not delete this GUID-based key. And, I checked why these GUID keys are generated. When I connect the drive for the first time after rebooting, only one key ##ServerName#VolumeName is created normally. However, the problem occurs after the drive disconnects abnormally. When connecting by setting CurrentSession, In this situation, when I connect with the same drive letter (Z:), the error "Can't assign a drive letter or mount point" occurs. (This is also a problem. It does not resolve over time. I wish it could be removed automatically. .) When I connect another drive (Y:) it generates a GUID based key. Two, three, or even four GUID-based keys are generated. When using Sandbox, GUID-based keys are always generated, even after reboot. Also, in Explorer, it is displayed as Network Drive, not the volume label I specified. |
Beta Was this translation helpful? Give feedback.
-
When setting CurrentSession with Impersonation in service mode, [15980] NPOpenEnum: dwScope 0x00000001, dwType 0x00000001, dwUsage 0x00000000, lpNetResource 0000000000000000 As the SessionID is set to 0, it does not match the CurrentSessionID, so the information cannot be found. Source reference: dokannp.c, lines 609 to 614 This SessionID is obtained through the GetCurrentSessionId function at line 837 of event.c and set at line 868. In cases like this, is there no way for the user to control it? It would be nice if you could pass the SessionID. Also, if the user can pass the SessionID value However, it could be a problem if the Session ID changes when the user logs out and logs in, or if an additional session is opened. |
Beta Was this translation helpful? Give feedback.
I agree that it would be great to have a way to pass which session to target but it would require some changes as we run some code that are thread session specific like https://github.com/dokan-dev/dokany/blob/9aa1570646dcddaa527ca040868c1fa8ea132348/sys/init.c#L814C14-L819
In the meantime, I can only propose to do a
CreateProcessAsUser
and process the mount in that new process which will have the correct sessionID as a workaround.I have created #1196 as a feature request