3

I need to know that is it possible to call specific tab of System Configuration through c# application.

Till now I am only able to call msconfig.exe through my code i.e.

ProcessStartInfo pf = new ProcessStartInfo(
       Path.Combine(Environment.SystemDirectory, "msconfig.exe"));
pf.Verb = "runas";
Process.Start(pf);

Now I want to call only Single tab to open that is StartUp at button click. Please get me some solution.

4

1 回答 1

4

Msconfig takes a number as argument to decide which tab to show. -4 is the StartUp Tab

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 No formal docs from microsoft seem to exist with regard to this argument. This works for me on Windows7.

于 2013-08-24T07:26:05.977 回答