DriveInfo.GetDrives() not returning mapped drives when run as administrator
问题 I'm creating a WPF app that among other things should check for the existence of several mapped drives. The code is straightforward: DriveInfo[] systemDrives = DriveInfo.GetDrives(); foreach (DriveInfo i in systemDrives) { if ((i.Name.Contains("V")) && (i.IsReady)) { result = true; break; } } The mapped drives are mapped fro all users. The code above works fine when run as a regular user, however is Visual Studio 2010 is run as administrator the GetDrives method only returns the Fixed drives