title: System Volume Information: Access Denied
body: <p>I have written a program that can search a physical device at the sector level, from start to finish.  Now I want to create a routine that will deal only with logical files.</p>
  
  <p>Therefore, I need to recursively list all directories and files on an NTFS volume (or FAT32) using native C++.  The problem I am running into is an "access denied" error whenever I encounter a Windows System folder.</p>
  
  <pre><code>C:\System Volume Information and
  C:\Users
  </code></pre>
  
  <p>are just two examples of these folders.</p>
  
  <p>I am NOT looking to "skip over" these directories.  On the contrary, they are most important to the project at hand.  </p>
  
  <p>I have tried a variety of options that have been offered up in C++ forums etc. and all of them seem to either fail (access denied) or the quick answer is to "skip over" them.  </p>
  
  <p>At this point, I am wondering if I need to somehow lookup the physical sector for these folders and systematically trace through the extents at the physical sector level for each? </p>
  
  <p>Looking for some help here and I would appreciate any ideas.  Thank you!</p>
  
  <p>NOTE:  I saw no point in posting any sample code only because I've tried way too many combinations (most of which could read directories etc.) but all of which failed to navigate System directories.</p>