none
Visual Studio 2012 drops all mapped drives when Run As Administrator

    Question

  • I can access my network shares (x, y, z, etc) when running SQL Server Data Tools for Visual Studio 2012. But, some features require Run As Administrator.

    When run as administrator network drives are not visible. If you attempt to override (say enter z: or z:\ etc et al) you get "z does not exist" or "...can't find drive z:"

    It's a bug in fact. But what about a workaround?

    Windows 8.1 patched up

    Visual Studio 2012

    Data Tools for visual studio

    Network drives mapped via Samba to CentOS Server 6.5x also fully 'patched'

    • Edited by ChrisTheBA Thursday, January 21, 2016 8:26 PM
    Thursday, January 21, 2016 8:25 PM

Answers


  • It's a bug in fact. But what about a workaround?


    No, in fact. It is not a bug.

    Network drives are assigned to a user. Obviously, it is important that when a network drive is assigned to yourself, that the network drive isn't seen by other users.

    When you run an application "as administrator", you are in fact running the application under a completely different account. This account has your name associated with it, but indeed it is a separate account, and the security model therefore declares that this account use its own mapped drives.

    So the "workaround" should be evident: Launch CMD.EXE as Administrator, and assign the network drives from the command line. These will be assigned to that Administrator account.

    Thursday, January 21, 2016 11:27 PM