Home > Windows > Windows Server > Windows Server 2008 > Q: In Windows Vista and Windows Server 2008, when I connect a drive to network share while running in normal user mode, I can't access it from an elevated administrator command prompt window. Is this normal? Is there a way around this?

Q: In Windows Vista and Windows Server 2008, when I connect a drive to network share while running in normal user mode, I can't access it from an elevated administrator command prompt window. Is this normal? Is there a way around this?

This screen shot shows two command prompt windows. The first is running in the security context of a normal (non-administrator) user, meaning the user has a filtered access token. The second prompt is running in the security context of an administrator account, and the administrator has a full access token. In both windows, the user retrieves a list of currently mapped network drives after the user mapped a network drive, Z, while running in normal user mode. In the normal user mode prompt the network drive shows up as OK, but in the administrator prompt the network drive shows up as unavailable.

This is the default behavior in Vista and Server 2008—mapped network drives become unavailable when switching to another security context. When network shares are mapped, they are linked to the current logon session for the current process access token. When you elevate to an administrator command prompt window, a second logon session is created, so the shares mapped in your normal user mode logon session become unavailable.

This default behavior can be changed using in the registry. To enable access to mapped network drives from administrator-level security contexts, create a new REG_DWORD registry value named EnableLinkedConnections with a value of 1 in the registry key HKLM \Software\Microsoft\Windows\CurrrentVersion\Policies\System. You must reboot your system for this to take effect. The EnableLinkedConnections registry value is documented in a Microsoft Knowledge Base article.