找回密码
 加入
搜索
查看: 11952|回复: 22

命令行方式访问控制面板项目的方法

  [复制链接]
发表于 2008-5-3 14:20:55 | 显示全部楼层 |阅读模式
<p><span>控制面板的每个工具都是以</span><span>.<span>cpl</span></span><span>文件(实际上就是些</span><span>DLL</span><span>文件)的形式提供给系统运行的,这些</span><span>.<span>cpl</span></span><span>文件位于:</span><span>Windows&#92;System32</span><span> </span><span>文件夹。</span></p><p><span>如果我们要以命令行的方式运行这些控制面板程序,可使用命令行工具&ldquo;</span><span>control.exe</span><span>&rdquo;:</span></p><span>Control.exe </span><span>目标文件</span><span>.<span><span>cpl</span></span><br /></span><span>下面列出</span><span>Windows</span><span>系统中可能含有的控制面板文件(并不完全,某些系统可能没有安装部分控制面板工具):</span>&lt;DIV align=center&gt; <table border="0"><tbody><tr><td><p><span>文件名</span></p></td><td><p><span>用途</span></p></td></tr><tr><td valign="top"><span>A<span>ccess.cpl</span><br /></span></td><td valign="top"><span>辅助功能选项<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Appwiz.cpl</span></span><span><br /></span></td><td valign="top"><span>添加<span>/</span>删除程序<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Desk.cpl</span></span><span><br /></span></td><td valign="top"><span>显示属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Firewall.cpl</span></span><span><br /></span></td><td valign="top"><span>Windows</span><span>防火墙<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Hdwwiz.cpl</span></span><span><br /></span></td><td valign="top"><span>添加硬件向导<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Inetcpl.cpl</span></span><span><br /></span></td><td valign="top"><span>Internet </span><span>属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Intl.cpl</span></span><span> <br /></span></td><td valign="top"><span>区域和语言选项<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Irprops.cpl</span></span><span><br /></span></td><td valign="top"><span>红外线端口属性(未安装红外线设备则无效)<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Joy.cpl</span></span><span><br /></span></td><td valign="top"><span>游戏控制器<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Main.cpl</span></span><span><br /></span></td><td valign="top"><span>鼠标属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Mmsys.cpl</span></span><span><br /></span></td><td valign="top"><span>声音和音频设备属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Ncpa.cpl</span></span><span><br /></span></td><td valign="top"><span>网络连接属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Netsetup.cpl</span></span><span><br /></span></td><td valign="top"><span>网络安装向导<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Nusrmgr.cpl</span></span><span><br /></span></td><td valign="top"><span>用户账户属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Nwc.cpl</span></span><span><br /></span></td><td valign="top"><span>NetWare</span><span>的网关服务属性<span><br /></span></span></td></tr><tr><td valign="top"><span>Odbccp32.cpl<br /></span></td><td valign="top"><span>ODBC</span><span>数据源管理器<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Powercfg.cpl</span></span><span> <br /></span></td><td valign="top"><span>电源选项属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Sapi.cpl</span></span><span> <br /></span></td><td valign="top"><span>语音属性(位于<span>C:&#92;Program files&#92;Common files&#92;Microsoft Shared&#92;Speech</span>)<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Sticpl.cpl</span></span><span><br /></span></td><td valign="top"><span>扫描仪和照相机<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Sysdm.cpl</span></span><span> <br /></span></td><td valign="top"><span>系统属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Telephon.cpl</span></span><span><br /></span></td><td valign="top"><span>电话和调制解调器选项<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Timedate.cpl</span></span><span> <br /></span></td><td valign="top"><span>日期和时间属性<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Wscui.cpl</span></span><span><br /></span></td><td valign="top"><span>Windows</span><span>安全中心<span><br /></span></span></td></tr><tr><td valign="top"><span><span>Wuaucpl.cpl</span></span><span><br /></span></td><td valign="top"><span>自动更新属性<span><br /></span></span></td></tr></tbody></table>&lt;/DIV&gt; <span>Control </span><span>命令用法:</span> <p><span>1</span><span>)在命令行中执行&ldquo;</span><span>control </span><span>控制面板文件</span><span>.<span>cpl</span></span><span>&rdquo;后即可打开相应属性</span><span>/</span><span>选项窗口。</span></p><p><span>也可使用此命令运行:&ldquo;</span><span>rundll32.exe shell32.dll,Control_RunDLL</span><span>控制面板文件</span><span>.<span>cpl</span></span><span>&rdquo;</span></p><p><span>比如:</span></p><p><span>1</span><span>、</span><span>control.exe <span>appwiz.cpl</span> </span><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>//</span><span>打开&ldquo;添加或删除程序&rdquo;</span></p><span>2</span><span>、</span><span>rundll32.exe shell32.dll,Control_RunDLL <span>appwiz.cpl</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//</span><span>效果同上</span><span><br /></span><p><span>2</span><span>)这两种方式都将运行相应控制面板工具的第一个项目</span><span>/</span><span>小程序,如果该控制面板工具含有多个项目,则可以此形式运行:&ldquo;</span><span>Control.exe </span><span>控制面板文件</span><span>.<span>cpl</span>,@</span><span>项目编号</span><span>&rdquo;。项目编号从</span><span>0</span><span>开始,表示第一个项目,不指定项目编号时默认为</span><span>@</span><span>0</span><span>。</span></p><p><span>比如:</span></p><span>1</span><span>、</span><span>control main.cpl,@0<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//</span><span>打开&ldquo;鼠标属性&rdquo;</span><span><br /></span><span>2</span><span>、</span><span>control main.cpl,@1<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//</span><span>打开&ldquo;键盘属性&rdquo;</span><span><br /></span><p><span>3</span><span>)有些属性窗口含有多个页面,我们可以指定具体要<span>打开哪</span>一个页面,格式:&ldquo;</span><span>Control.exe </span><span>控制面板文件</span><span>.<span>cpl</span>,@</span><span>项目编号</span><span>,</span><span>页面号</span><span>&rdquo;,其中</span><span>@</span><span>项目编号可留空,表示使用默认数值</span><span>0</span><span>。要提醒一下的是,这里的&ldquo;页面号&rdquo;定义比较混乱,并非严格从</span><span>0</span><span>开始,请自行试验。</span></p><p><span>比如:</span></p><p><span>1</span><span>、</span><span>control main.cpl,@1,2<span> </span>//</span><span>打开&ldquo;鼠标属性&rdquo;的第三个标签页&ldquo;指针选项&rdquo;</span></p><span>2</span><span>、</span><span>Control.<span>exe</span> appwiz.cpl,@0,2<span>&nbsp; </span><br /></span><p><span>//</span><span>打开</span><span>&ldquo;添加或删除程序&rdquo;的第二个页面&ldquo;添加</span><span>/</span><span>删除</span><span>Windows</span><span>组件&rdquo;</span></p><p><span>4</span><span>)</span><span>Windows </span><span>还特别定义了某些常用的控制面板项目名,使用这些名称可以更加简便地访问它们。</span></p><p><span>比如:</span></p><span>1</span><span>、</span><span><span><span>control <span>netconnections</span><span>&nbsp;&nbsp;&nbsp; </span>//</span></span><span><span>打开&ldquo;网络连接&rdquo;</span></span><span><span><br /></span></span></span><span><span><span>2</span></span><span><span>、</span></span><span><span>control color<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//</span></span><span><span>显示属性的外观选项卡</span></span><span><span><br /></span></span></span><p><span>下面列出可用的项目名:</span></p>&lt;DIV align=center&gt; <table border="0"><tbody><tr><td valign="top"><span>desktop<br /></span></td><td valign="top"><span>打开 <strong>显示属性</strong> 窗口<span><br /></span></span></td></tr><tr><td valign="top"><span>color<br /></span></td><td valign="top"><span>打开 <strong>显示属性</strong> 的 <strong>外观</strong> 选项卡<span><br /></span></span></td></tr><tr><td valign="top"><span>date/time<br /></span></td><td valign="top"><span>打开 <strong>日期和时间</strong> 属性窗口<span><br /></span></span></td></tr><tr><td valign="top"><span>international<br /></span></td><td valign="top"><span>打开 <strong>区域和语言选项</strong> 窗口<span><br /></span></span></td></tr><tr><td valign="top"><span>mouse<br /></span></td><td valign="top"><span>打开 <strong>鼠标属性</strong> 窗口<span><br /></span></span></td></tr><tr><td valign="top"><span>keyboard<br /></span></td><td valign="top"><span>打开 <strong>键盘属性</strong> 窗口<span><br /></span></span></td></tr><tr><td valign="top"><span>printers<br /></span></td><td valign="top"><span>打开 <strong>打印机和传真</strong> 文件夹<span><br /></span></span></td></tr><tr><td valign="top"><span>fonts<br /></span></td><td valign="top"><span>打开 <strong>字体</strong> 文件夹<span><br /></span></span></td></tr></tbody></table>&lt;/DIV&gt; <p><span>Windows 2000 </span><span>及后续操作系统:</span></p>&lt;DIV align=center&gt; <table border="0"><tbody><tr><td valign="top"><span>folders<br /></span></td><td valign="top"><span>打开 <strong>文件夹选项</strong> 窗口<span><br /></span></span></td></tr><tr><td valign="top"><span><span>netware</span></span><span><br /></span></td><td valign="top"><span>打开 <strong><span>Novell NetWare</span></strong><span> </span>窗口(如果有安装的话)<span><br /></span></span></td></tr><tr><td valign="top"><span>telephony<br /></span></td><td valign="top"><span>打开 <strong>电话和调制解调器选项</strong> 窗口<span><br /></span></span></td></tr><tr><td valign="top"><span><span>admintools</span></span><span><br /></span></td><td valign="top"><span>打开 <strong>管理工具</strong> 文件夹<span><br /></span></span></td></tr><tr><td valign="top"><span><span>schedtasks</span></span><span><br /></span></td><td valign="top"><span>打开 <strong>任务计划</strong> 文件夹<span><br /></span></span></td></tr><tr><td valign="top"><span><span>netconnections</span></span><span><br /></span></td><td valign="top"><span>打开 <strong>网络连接</strong> 文件夹<span><br /></span></span></td></tr><tr><td valign="top"><span>infrared<br /></span></td><td valign="top"><span>打开 <strong>红外线监视</strong> 窗口(如果有安装的话)<span><br /></span></span></td></tr><tr><td valign="top"><span><span>userpasswords</span></span><span><br /></span></td><td valign="top"><span>打开 <strong>用户账户</strong> 窗口<span><br /></span></span></td></tr></tbody></table>&lt;/DIV&gt;
发表于 2008-5-4 09:44:24 | 显示全部楼层

好东西,收藏!

好东西,收藏!
谢谢!
发表于 2008-5-4 21:30:14 | 显示全部楼层
这个好,收藏了!
发表于 2008-5-5 04:54:19 | 显示全部楼层
留足
发表于 2008-5-5 17:52:25 | 显示全部楼层
收藏..
发表于 2008-5-6 13:48:19 | 显示全部楼层
似乎不错~收藏
发表于 2008-5-20 13:43:48 | 显示全部楼层
好东西!
谢谢提供!
发表于 2008-5-22 16:54:49 | 显示全部楼层
谢谢楼主,收藏了。
发表于 2008-5-25 08:16:15 | 显示全部楼层
找了很久终于找到了。非常感谢!
发表于 2008-10-17 08:04:42 | 显示全部楼层
很有用,谢谢
发表于 2008-10-31 11:10:49 | 显示全部楼层


请问怎么把整个控制面板放入工具箱里面。
如下

http://www.autoitx.com/forum.php?mod=viewthread&tid=3437
发表于 2008-11-3 15:10:20 | 显示全部楼层
楼主好样的.
收起来了.
发表于 2009-4-15 02:04:31 | 显示全部楼层
收藏了
发表于 2009-4-16 08:56:39 | 显示全部楼层
谢谢lZ指点。。。
发表于 2010-12-30 07:43:52 | 显示全部楼层
收藏下!很全面!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-4 01:16 , Processed in 0.074466 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表