Why cmd.exe cannot access a lettter-mapped drive when it's "Run as..."

Starting with Windows XP, each LSA logon session (not related to Terminal Services sessions) has its own set of drive letter assignments. If you use Run As... – whether the account is same or different – the function still creates a separate logon session with the credentials given.

Starting with Windows 8 or Server 2012 (approximately), you can enable the EnableLinkedConnections registry value at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System to allow UAC elevated applications share the regular drive mappings.

More:

  • MS KB 937624 (2011-06-24): Programs may be unable to access some network locations after you turn on User Account Control in Windows Vista or in Windows 7
  • MS KB 3035277: Mapped drives are not available from an elevated prompt when UAC is configured to "Prompt for credentials" in Windows