c#操纵控制面板

时间:2021-07-27 17:09:27

Win7-x64系统下测试通过:

 

用户帐户

System.Diagnostics.Process.Start("control.exe", "nusrmgr.cpl");

 

日期和时间 

日期和时间

System.Diagnostics.Process.Start("control.exe", "timedate.cpl,,0");

附加时钟

System.Diagnostics.Process.Start("control.exe", "timedate.cpl,,1");

 

显示属性

桌面图标设置

System.Diagnostics.Process.Start("control.exe", "desk.cpl,,0"); 

屏幕保护程序设置

System.Diagnostics.Process.Start("control.exe", "desk.cpl,,1"); 

个性化

System.Diagnostics.Process.Start("control.exe", "desk.cpl,,2"); 

屏幕分辨率

 System.Diagnostics.Process.Start("control.exe", "desk.cpl,,3"); 

窗口颜色和外观

System.Diagnostics.Process.Start("control.exe", "desk.cpl,,5");

 

添加打印机

System.Diagnostics.Process.Start("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL AddPrinter");

 

电源选项

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

 

本地用户和组

System.Diagnostics.Process.Start("lusrmgr.msc");

 

声音

播放

System.Diagnostics.Process.Start("control.exe", "mmsys.cpl,,0");

录制

System.Diagnostics.Process.Start("control.exe", "mmsys.cpl,,1");

声音

System.Diagnostics.Process.Start("control.exe", "mmsys.cpl,,2");

通信

System.Diagnostics.Process.Start("control.exe", "mmsys.cpl,,3");

 

鼠标属性

鼠标键

System.Diagnostics.Process.Start("control.exe", "main.cpl,,0");

指针

System.Diagnostics.Process.Start("control.exe", "main.cpl,,1");

指针选项

System.Diagnostics.Process.Start("control.exe", "main.cpl,,2");

滑轮

System.Diagnostics.Process.Start("control.exe", "main.cpl,,3");

硬件

System.Diagnostics.Process.Start("control.exe", "main.cpl,,4");

 

设备管理器

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

 

Internet属性

常规

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,0");

安全

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,1");

隐私

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,2");

内容

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,3");

连接

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,4");

程序

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,5");

高级

System.Diagnostics.Process.Start("control.exe", "inetcpl.cpl,,6");

 

区域和语言

格式

System.Diagnostics.Process.Start("control.exe", "intl.cpl,,0");

位置

System.Diagnostics.Process.Start("control.exe", "intl.cpl,,1");

键盘和语言

System.Diagnostics.Process.Start("control.exe", "intl.cpl,,2");

管理

System.Diagnostics.Process.Start("control.exe", "intl.cpl,,3");

 

游戏控制器

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

 

网络连接

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

 

系统属性

计算机名

System.Diagnostics.Process.Start("control.exe", "sysdm.cpl,,1");

高级

System.Diagnostics.Process.Start("control.exe", "sysdm.cpl,,3");

远程

System.Diagnostics.Process.Start("control.exe", "sysdm.cpl,,5");

 

TabletPC

笔选项

System.Diagnostics.Process.Start("control.exe", "TabletPC.cpl,,0");

笔势

System.Diagnostics.Process.Start("control.exe", "TabletPC.cpl,,1");

手写

System.Diagnostics.Process.Start("control.exe", "TabletPC.cpl,,2");

 

语音属性

System.Diagnostics.Process.Start(Environment.SystemDirectory + @"/Speech/SpeechUX/sapi.cpl");