FolderSizes, Mapped Drives, and Windows Vista

We’ve received a few reports from users that are unable to see one or more mapped drives from within FolderSizes when running it on Windows Vista. Unfortunately, this issue is the result of a Vista security design decision and impacts a broad range of software applications (not just FolderSizes).

The root problem is that (by default) Vista creates two user security tokens when you log in – the first being a default “filtered” (or non-admin) token and the second having administrative capabilities. Usually, you gain access to the latter (admin token) only after being prompted by a User Account Control (UAC) consent dialog.

FolderSizes contains an application manifest that causes it to run with the highest permissions available to the user, which on Windows Vista means you’ll be prompted (by UAC) to allow the process to “elevate” itself and run within the context of your full admin token. This is important when using FolderSizes because it helps to ensure full access to the various storage resources that the software analyzes.

So why does any of this impact the visibility of mapped drives within FolderSizes? Because under Vista when you map a network share it is linked to the current logon session for the current process token. This means you won’t have access to the mapped drive from your alternate, admin token (which FolderSizes runs under by default).

One solution is to run Windows Explorer “as administrator” (which you can do with a right-click of the Windows Explorer shortcut) and duplicate your mapped drives from there. They will then be visible to any process that elevates itself during execution.

Another option is to use UNC paths whenever possible. If you find that you can’t access a mapped drive in Vista (because you created the mapping with a restricted account token), you might consider just entering the UNC path (e.g. \\server\share) into the Path box near the top of the main FolderSizes window.

Yet another option is to make a registry change that will allow Vista to share network connections between your filtered access token and your full administrator token. From MS Knowledge Base article 937624, you can do this as follows:

  1. Click Start, type regedit in the Start Search box, and then press ENTER.
  2. Locate and then right-click the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  3. Point to New, and then click DWORD Value.
  4. Type EnableLinkedConnections, and then press ENTER.
  5. Right-click EnableLinkedConnections, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Exit Registry Editor, and then restart the computer.

Of course, the usual warnings apply – don’t edit your Windows registry unless you know what you’re doing (and preferably have a backup handy just in case something goes wrong).