Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically open control panel?

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?


1 Answers

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)

like image 194
Anders Avatar answered Jul 18 '26 03:07

Anders