c# - 如何从 C# 中的代码打开 Windows 设置页面?

标签 c# windows operating-system

如何从 C# 代码中打开如下所示的 Windows 设置?我并不是要操纵它们,而只是为用户打开它们。

抱歉,我什至不知道这个问题的正确关键字。

enter image description here

enter image description here

(屏幕截图为德语。)

编辑:(除了答案)

  • C:\Windows\System32\ 中搜索 *.cpl*.msc。几个有趣的:
    • 防火墙.cpl
    • hdwwiz.cpl

最佳答案

尝试运行 Network-Adapter-Settings

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

Process.Start(startInfo);

关于c# - 如何从 C# 中的代码打开 Windows 设置页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29891963/

相关文章:

sockets - 其他操作系统是否实现了 Linux 系统调用拼接?

c# - 函数的 "static new"修饰符有什么意义?

c# - 在立即窗口中设置属性未设置?

c# - MVVM Light Dispatcher 帮助程序设计时错误

c# - 带有数字或特殊字符的密码复杂性正则表达式

docker 上的 Windows 服务无法启动

windows - Perl:使用 cygwin perl 运行 perl 脚本时找不到启动命令 (Windows)

linux - 使用具有不同操作系统基础框的 docker 容器是否会对性能产生影响?

python - 为什么我的 Streamlit 应用程序会打开多次?

windows - 使用大括号或循环时 sed 出现额外字符错误