如何以编程方式打开控制面板?
如何以编程方式打开自定义控制面板,例如 custom.cpl? 具体来说,作为 32 位应用程序运行时如何打开 64 位 cpl?
How do I open a custom control panel programmatically, like custom.cpl? Specifically, how do I open a 64-bit cpl when running as 32-bit application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Vista 添加了对规范名称的支持,因此您不必硬编码 dll 文件名和选项卡索引
示例:
WinExec("%systemroot%\system32\control.exe /name Microsoft.WindowsUpdate", SW_NORMAL);
(名称始终为英文)
请参阅 MSDN 了解 XP/2000 支持“control.exe mouse”和其他一些关键字的列表
,请参阅相同的 MSDN 页面以获取列表(您可能可以通过在 control.exe 上运行字符串来找到一些未记录的列表)
Vista added support for canonical names so you don't have to hard code dll filenames and tab indexs
Example:
WinExec("%systemroot%\system32\control.exe /name Microsoft.WindowsUpdate", SW_NORMAL);
(Names are always in english)
See MSDN for a list
XP/2000 supports "control.exe mouse" and a few other keywords, see the same MSDN page for a list (You can probably find some undocumented ones by running strings on control.exe)
由于我在这里没有找到一个好的答案,所以这是我研究的解决方案:
Since I didn't find a good answer here on SO, here's the solution of my research:
只需使用这个....
just use this....
步骤1 :
从机器读取系统目录。
第2步 :
使用Process启动ControlPanel
Step1 :
Read System Directory from the machine.
Step2 :
Use Process to start ControlPanel
正如我之前在另一个问题中提到的:
如果您在命令提示符中键入“开始控制”或“控制”,它将打开控制面板。
因此只需运行一个进程即可。
这段代码(波纹管)非常适合我:
As i previously mentioned in another Question:
If you type "Start Control" or "Control" into Command Prompt it will open Control Panel.
Therefore just run a Process.
This Code (Bellow) worked perfectly for me: