omeryanar / FileExplorer

Windows File Explorer alternative with tab browsing
MIT License
456 stars 28 forks source link

Network Drives cannot be accessed (NullReferenceException) #3

Closed soraphis closed 3 years ago

soraphis commented 3 years ago

I've added a network drive and mounted it as Z: The drive is not listed in 'FileExplorer' and cannot be accessed via direct path. If trying to do so a nullref. exception occours:

image

TheBauwssss commented 3 years ago

Are you perhaps running the FileExplorer application under an account which is a member of the Administrator group (e.g. an admin account, also called root on Linux)? If you are, then that is most likely the cause of your problem. I'll try to explain.

You see, Windows has a typical quirk, a very annoying, old-fashioned 'gotcha' if you will that you just have to know. I've spent hours and hours and HOURS Googling for a solution for this very problem until I eventually gave up because it took too much time. Several months later, by pure random chance, I came across the answer, in an inconspicuous forum post not unlike this message.

Namely, the thing is that any and all applications executing under the namespace of an account not solely member of the Users group will be barred from accessing each and every network share mapped to a drive letter. This is something that Windows has done by default ever since the introduction of the UAC; even though this blockade is simply a side effect of the previously mentioned UAC system, it was left in place for a very good reason.

For the sake of brevity I'll refrain from going into any further detail here, Instead I'll provide you with a link below explaining the reason for this blockade along with instructions as to how to prevent Windows from blocking Administrators from accessing mapped network drives. Of course, another option is to run the program as a normal user, but I reckon you've got a good reason for running the program with Administrator privileges in the first place.

Here is a comprehensive explanation of the reason for this behaviour along with simple instructions to disable the blockade: http://woshub.com/how-to-access-mapped-network-drives-from-the-elevated-apps/

Additionally, for the more technically inclined user, here is a link to a much more comprehensive guide to achieve pretty much the same result; and that in a much safer way (namely without creating an huge security vulnerability [in my opinion]): https://michlstechblog.info/blog/windows-activate-administrator-access-over-network/ (Do note that this is a much more involved process!)

omeryanar commented 3 years ago

Latest release (v1.7) includes network share support.