title: Why am I getting an access denied error for the Documents and Settings folder?
body: <p>I'm writing a program that gets all directories and sub-directories. I'm using the following code:</p>
  
  <pre><code>DriveInfo[] drives = DriveInfo.GetDrives();
  foreach (DriveInfo drive in drives)
  {
      string[] directories = Directory.GetDirectories(drive.Name, "*", SearchOption.AllDirectories);
  }
  </code></pre>
  
  <p>But I'm getting an exception stating "Access to the path 'C:\Documents and Settings\' is denied."</p>
  
  <p>I'm using Windows 7 and I don't see a C:\Documents and Settings\ folder in Explorer. I enabled "Show hidden files and folders" and even try to type in the path directly but it gives the following error: "C:\Documents and Settings is not accessible. Access denied." </p>
  
  <p>Why is <code>Directory.GetDirectories()</code> pulling a directory that doesn't seem to exist?</p>