用这个把我的头撞在墙上大约 2 天。
我正在使用 System.Diagnostics.Process 来执行 dirquota.exe。我在 .Start() 捕获了一个异常,即“系统找不到指定的文件”。
我现在正在做:
foreach (var fi in new DirectoryInfo(@"C:\Windows\System32\").GetFiles())
{
Console.WriteLine(fi.Name);
}
除了 dirquota.exe 之外,这几乎输出了该目录中的每个文件。任何人?
干杯。