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

dokannp1.dll must be copied to %WINDIR%\system32 #656

Closed
4 of 5 tasks
HanixNicolas opened this issue Jan 30, 2018 · 7 comments
Closed
4 of 5 tasks

dokannp1.dll must be copied to %WINDIR%\system32 #656

HanixNicolas opened this issue Jan 30, 2018 · 7 comments
Labels

Comments

@HanixNicolas
Copy link
Contributor

Environment

  • Windows version: Windows 10 Enterprise N x64
  • Processor architecture: x64
  • Dokany version: 1.1.0.2000
  • Library type (Dokany/FUSE): Dokany

Check List

  • I checked my issue doesn't exist yet
  • My issue is valid with mirror default sample and not specific to my user-mode driver implementation
  • I can always reproduce the issue with the provided description below.
  • 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

Using Mirror on Windows 10 Enterprise N  x64
mirror /r c:\test /l M: /n /c 
Drive M  is ok in explorer,but run  C:\Windows\SysWOW64\notepad.exe 
 click menu File->Open->This PC
 The drive M show as Disconnected Network Drive

Logs

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

@HanixNicolas
Copy link
Contributor Author

HanixNicolas commented Jan 30, 2018

In explorer Drive is ok
explorer

32bit notepad.exe try to open file.
32bit-notepad

The Drive M show as disconnected Network Drive
notepad

the reason is dokannp1.dll must be copied to %WINDIR%\system32.
on x64 copy dokannp1.dll (64) to %WINDIR%\system32
copy dokannp1.dll (x86) to %WINDIR%\SysWOW64
and change the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\dokan1\NetworkProvider
change ProviderPath type to REG_EXPAND_SZ value to %WINDIR%\system32\dokannp1.dll

then it ok.
fix

please modify the install script. thank you

@Liryna
Copy link
Member

Liryna commented Feb 1, 2018

Hi @HanixNicolas ,

It is weird that it needs to be copied in system32. dokannp1.dll was at first in the folder but we moved it to installer folder, changed the dokanctl to register correctly the dll path.

I also did the test on my VM and I do not face the issue (notepad 64bit).
image

Your notepad seems to run 32 bit ? dokannp register is 64 bit so in case of....already seen some app 32 bits having issues on the NP
Does you notepad 64bit work ?

edit: have the same issue with notepad 32bit should probably try to see the reason why 32bit cannot use the NP

@HanixNicolas
Copy link
Contributor Author

Hi,@Liryna,I am very happy to receive your reply.
notepad 64bit also work in my VM.

On 64bit windows,The operating system uses the %SystemRoot%\system32 directory for its 64-bit library and executable files. When executing 32-bit applications, WoW64 transparently redirects 32-bit DLLs to %SystemRoot%\SysWoW64, which contains 32-bit libraries and executables.
more info:
WoW64
File System Redirector

@Liryna
Copy link
Member

Liryna commented Feb 2, 2018

Hi @HanixNicolas ,

Yes, I am aware of the 32-bit redirection. We even disable it in dokanctl (that register during install the network provider with dokanctl /i n.
https://github.com/dokan-dev/dokany/blob/master/dokan_control/dokanctl.c#L116

What I wonder is if we probably need to register the dokannp1 32 bits also in the register ? (so register 32 & 64 NP)

@Liryna Liryna added the Bug label Feb 2, 2018
@HanixNicolas
Copy link
Contributor Author

Hi @Liryna
we don't need to register the dokannp1 32 bits also in the register.
Just copy 32bit dokannp1.dll to %WINDIR%\SysWOW64
and change the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\dokan1\NetworkProvider
change ProviderPath type to REG_EXPAND_SZ value to %WINDIR%\system32\dokannp1.dll.
Then it will be ok.

@Liryna
Copy link
Member

Liryna commented Feb 25, 2018

Hi @HanixNicolas ,

I could do more test and you are right, register the dokannp1.dll inside the system32 fix the issue 👍
What bothers me here is that dokannp1.dll need dokan1.dll because of the usage of DokanGetMountPointList and it would mean to copy dokan1.dll in the system32.

(for information it is me who moved it to install folder 👎 #171)

@Rondom what do you think about install dokannp1 & dokan1.dll in system32 again ?

note: I just tried to install dokannp in %programfiles% and changed the providerPath to %programfiles% but could not make it work 😢 system32 seems to be the only redirected folder.
Also, virtualbox is also installing the network provider in system32 and wow64

@Liryna
Copy link
Member

Liryna commented Mar 3, 2018

My bad 😞 @Rondom, forgot dokan1.dll is already in system32 folder. So the change has no issue and no reason to not be done 👍
I have revert #171 -> 405c71e

Thank you for your time @HanixNicolas and feedback !

@Liryna Liryna closed this as completed Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants