我需要知道是否可以通过 C# 应用程序调用系统配置的特定选项卡。
到目前为止,我只能通过我的代码调用 msconfig.exe
,即
ProcessStartInfo pf = new ProcessStartInfo(
Path.Combine(Environment.SystemDirectory, "msconfig.exe"));
pf.Verb = "runas";
Process.Start(pf);
现在我只想在单击按钮时调用单个选项卡打开 StartUp
。
请给我一些解决方案。
最佳答案
Msconfig 使用一个数字作为参数来决定显示哪个选项卡。 -4
是启动选项卡
ProcessStartInfo pf = new ProcessStartInfo(
Path.Combine(Environment.SystemDirectory, "msconfig.exe"));
pf.Verb = "runas";
pf.Arguments ="-4";
Process.Start(pf);
+--------------------+
| Arg | Tab |
+--------------------+
| -1 | General |
| -2 | Boot |
| -3 | Services |
| -4 | Startup |
| -5 | Tools |
+--------------------+
blog with the arguments关于这个论点,似乎没有来自微软的正式文档。这在 Windows7 上对我有用。
关于c# - 是否可以调用特定的 msconfig 选项卡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18416028/