VS2013 UAC模式看不到网络驱动器

VS2013在管理员模式下,看不到网络驱动器。

非管理员模式,正常启动是看得到的。

原因在于:

If you run a process (such as Visual Studio) elevated (as you claim in comments), it’s not running as your current Windows user, but as Administrator.

Administrator does not have the drive mappings that your user has. So your Visual Studio cannot see the P: drive at all. All is working as intended.

See How to access network shares from an elevated process in Windows 7?: use the UNC path to the share (\server\share\file.xml).

参考 http://stackoverflow.com/questions/21887453/vs2013-different-to-vs2010-and-i-cannot-access-network-drive-from-windows-applic

To work around this problem, configure the EnableLinkedConnections registry value. This value enables Windows Vista and Windows 7 to share network connections between the filtered access token and the full administrator access token for a member of the Administrators group. After you configure this registry value, LSA checks whether there is another access token that is associated with the current user session if a network resource is mapped to an access token. If LSA determines that there is a linked access token, it adds the network share to the linked location. To configure the EnableLinkedConnections registry value

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

猜你喜欢

转载自blog.csdn.net/commshare/article/details/76165105