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:
Could not find a part of the path 'C:\windows\system32\grouppolicy\Machine'.
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:
string[] files;
files = Directory.GetFiles(Environment.SystemDirectory + @"\grouppolicy\Machine");
Running Visual Studio as admin, Win 7 64 bit
EDIT
Directory.GetDirectories(Environment.SystemDirectory + @"\grouppolicy\") also returns no folders even though I see 3 subfolders in explorer.