Bitterblue
Bitterblue

Reputation: 14085

How to open Windows Settings Pages from code in C#?

How do I open Windows settings like the ones below from code in C#? I'm not trying to manipulate them, but to just open them for the user.

Sorry, I don't even know the right keywords for this question.

enter image description here

enter image description here

(Screenshots are in German.)

Edit: (in addition to the answers)

Upvotes: 3

Views: 1520

Answers (3)

Philipp H.
Philipp H.

Reputation: 562

You can open both via:

Process.Start("ncpa.cpl");
Process.Start("explorer.exe", @"shell:::{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}");

Upvotes: 3

Umut D.
Umut D.

Reputation: 1846

You can just use;

System.Diagnostics.Process.Start("NCPA.cpl");

Upvotes: 2

Edi G.
Edi G.

Reputation: 2422

try this to run Network-Adapter-Settings

ProcessStartInfo startInfo = new ProcessStartInfo("NCPA.cpl");
startInfo.UseShellExecute = true;

Process.Start(startInfo);

Upvotes: 4

Related Questions