Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


Return to article

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?
 

A: The behavior you experienced is illustrated here.

Availability of mapped network drives in normal user and administrator-level command prompt windows. Click to expand.

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.

Related Reading:
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement