title: .NET Group Policy\Machine folder
body: <p>I have a unique requirement (let's just leave it at that) to access the System32\GroupPolicy\Machine folder from C#.  I can browse to the directory with full control, but when accessing from C# I get the following error:</p>
  
  <p>Could not find a part of the path 'C:\windows\system32\grouppolicy\Machine'.</p>
  
  <p>I can't use any other traditional methods of accessing policies, it has to be done through the file system.  Here's the code I'm using just trying to browse the directory:</p>
  
  <pre><code>  string[] files;  
  </code></pre>
  
  <p><code>files = Directory.GetFiles(Environment.SystemDirectory + @"\grouppolicy\Machine");</code></p>
  
  <p>Running Visual Studio as admin, Win 7 64 bit</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Directory.GetDirectories(Environment.SystemDirectory + @"\grouppolicy\") also returns no folders even though I see 3 subfolders in explorer.</p>