Saturday, 29 September 2012

How to restore missing mapped network shares

I mostly use Passmark's excellent Performance Test 7 for testing NAS performance (I do use some other tools as well, such as Xbit Labs' ancient but handy FC-Test).

It has served me well for several years, but I have occasionally come across a problem that stumped me. When I set up the NAS for testing, I create a mapped share in Windows, as Performance Test only recognises mapped drives, not UNC paths. A couple of times I've done this, the mapped share was not visible from the Preferences menu in Performance Test, so I couldn't set it up to run the tests. It completely baffled me, as the shares were visible in Explorer and other applications, and could be used as normal.

This happened again recentlly, but this time in Windows 8 RTM, so I decided to have a look on Passmark's site to see if there were any known Windows 8-related isssues. Although there were none, I spotted an entry in the Performance Test FAQ called 'Why can't I select a network drive for testing?'. And sure enough, the problem was revealed.

It turns out that there is a glitch related to the User Account Control (UAC) from Vista onwards. The cause is that UAC actually treats user accounts in the Adminstrators group as standard users. It's rather convoluted (as explained in this MS KnowlegeBase article), but what it means in practice is that if you map a network drive while logged on as standard user or Administrator, any programs that run with elevated admin privileges (such as Performance Test) will not be able to access those mapped drives.

One cure is to turn off UAC completely, but that's not really a wise move. The other, as documented in the MS article above, is to make a change to the Registry. Here's the procedure in detail, paraphrased from Microsoft:

  • Open Regedit by pressing the Windows logo key + R, then type 'regedit' into the box and press Enter
  • In the left pane, navigate to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  • Click on a blank area in the right pane and choose New, then DWORD Value (choose 32-bit if using Windows 64-bit). 
  • Change the name of this new item to EnableLinkedConnections,
  • Double-click the new entry and change its value to 1, then click OK.
  • Close Regedit and restart the PC.

It's very straightforward, and worked first time for me. Now all apps can, including Performance Test, can see the mapped drives with no problem.

I should reiterate that this is only a fix if your mapped drives are not visible from within an application that runs with elevated privileges - in my case, everything was normal except from within Performance Test.

No comments:

Post a Comment