我想使用Visual Studio2010 C# .Net在Windows7中打开磁盘碎片整理程序窗口。
我使用以下代码:
Process.Start("dfrgui"); // 'dfrgui' is used to open disk defragment window in Windows 7
但是窗口不会出现。
但在Windows XP中,我使用
Process.Start("dfrg.msc");
在这里窗口确实出现了。
在Windows7中有没有其他方法调用碎片整理程序?
发布于 2013-08-27 17:34:43
使用这个命令,我希望它能在每个系统上运行
ProcessStartInfo pf = new ProcessStartInfo(Path.Combine(Environment.SystemDirectory, "dfrgui.exe"));
pf.Verb = "runas";
Process.Start(pf);
https://stackoverflow.com/questions/12668253
复制相似问题