How to make elevated programs recognize network drives

Buy AB Commander:
Personal license $39.95
Business license $79.95

Try AB Commander free:
Download free trial

One of the useful tools that Windows offers is the ability to assign drive letters to the network locations. You can use the Map Network Drive command of Windows Explorer or AB Commander to create the network drives. After a network drive has been created, you can use it just like any other drive: browse its contents, copy file to or from it, and so on.

A problem may occur, however, if you use Windows Vista or Windows 7 and need to access the network drive from an application that runs elevated (a.k.a. as administrator). For example, you may want to restrict access or assign a password to a network drive (or folder it contains) with Folder Guard. To enable such protection, you need to run Folder Guard as administrator. However, when you open its window, you may not see the network drive in it. What’s wrong?

Another example: when you run AB Commander as usual, it runs as the standard user, and displays any network drive that you might have created, for example:

AB Commander shows a network drive in the Computer folder
enlarge the image

However, unlike Windows Explorer that always runs as a standard user, AB Commander offers you an option to run it as administrator. (You can do it by using the Restart as Administrator command on the Tools menu.) If you restart AB Commander as administrator, you might be surprised to see no network drive in its window:

Why is the network drive missing?
enlarge the image

(You can recognize that AB Commander is running as administrator by the presence of the Administrator label in its title bar).

To understand why the network drive is not visible to the programs running as administrator, we have to consider how Windows handles the standard and administrator user access internally. In simple terms, when UAC (User Account Control) is enabled, Windows creates a split personality for your user account: one with the standard user’s access rights to do the the regular tasks, and another one with the full administrative access to the system. When you log in to the computer, Windows tries hard to create the impression that these two personalities are the same: they share the login name and password, the desktop and documents, settings and preferences, and so on. However, when it comes to mapping the network drives, Windows prefers to treat them as separate accounts (for security reasons). That’s why the network drives created when you wear the hat of the standard user do not automatically become available when you put the administrator’s hat on. This Microsoft article explains it all in detail.

Such behavior is rather counter-productive: after all, the administrator account is supposed have more access to the system, it’s supposed to be able to see and do all things that are available to the standard user, plus some more. Why can’t it see the network drive created by the standard user?

In any case, there is a way to force Windows to make the network drives available to both the standard and administrator accounts automatically. All you need to do is run Registry Editor (regedit.exe), locate the key HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System, and create a new DWORD entry with the name EnableLinkedConnections and value 1:

The value EnableLinkedConnections in the registry
enlarge the image

Caution: If you are not very experienced with Registry Editor, please be extra careful: it’s a powerful tool that can do a lot of damage to your system if used carelessly.

After you’ve added the EnableLinkedConnections value to the Registry, restart the computer, and after that the network drives you create should become available to the elevated applications, as well, and make you able, for example, to use Folder Guard to assign a password to the network drive, it you need to protect access to it.

Happy networking!

If you want to link to this article, you can use this HTML code: <a href=”http://www.winability.com/how-to-make-elevated-programs-recognize-network-drives/”>How to make elevated programs recognize network drives</a>

More information

Tags: , , , , ,

Comments:

  1. JD Patton says:

    Perfect. That fixed my problem. Thanks for the clear explanation and solution!

  2. mike says:

    Awesome fix. Is it at all possible to edit that registry key from a built in Win8 configuration/option screen? Or for now it’s only manual?

    Just so everyone knows what fixed my problem, here’s my problem and what i did to fix it:
    PROBLEM: Running a SETUP program which looks for server installtions on mapped network drives, and it was NOT finding any of the network drives.
    SOLUTION: “In any case, there is a way to force Windows to make the network drives available to both the standard and administrator accounts automatically. All you need to do is run Registry Editor (regedit.exe), locate the key HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System, and create a new DWORD entry with the name EnableLinkedConnections and value 1″

  3. Boris Litvak says:

    So simple and easy! Thanks for saving me lots of time!

Leave a Comment:

IMPORTANT! Do not put any URLs in the comment, or it will be rejected. Before submitting, please solve the following simple math (so we know that you are not a spambot) :-)

What is 3 - 2 ?
Please leave these fields as-is: