Open Control Panel via Shell in Rev

Ben Fisher boinjyboing at hotmail.com
Tue Feb 1 17:56:32 CST 2005


Hi Derek,

This page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/conpanel.asp<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/conpanel.asp> should answer your question.

-Ben

-quote-
The user or an application can start a Control Panel item by executing it directly from the command line prompt.

An application can open the Control Panel programmatically using the WinExec function.

WinExec("c:\windows\system32\control.exe", SW_NORMAL);

The following example shows how an application can start the Control Panel item named MyCpl.cpl by using the WinExec function.

WinExec("c:\windows\system32\control.exe MyCpl.cpl", SW_NORMAL);

When Control Panel starts, it immediately executes the Control Panel item MyCpl.cpl. After the user finishes using the item and closes it, Control Panel ends.

When you use the WinExec function, the system can recognize special Control Panel commands.

control.exe desktop Launches the Display Properties window. 

control.exe color Launches the Display Properties window with the Appearance tab preselected. 

control.exe date/time Launches the Date and Time Properties window. 

control.exe international Launches the Regional and Language Options window. 

control.exe mouse Launches the Mouse Properties window. 

control.exe keyboard Launches the Keyboard Properties window. 

control.exe printers Displays the Printers and Faxes folder. 

control.exe fonts Displays the Fonts folder. 

For Windows 2000 and later systems:

control.exe folders Launches the Folder Options window. 

control.exe netware Launches the Novell NetWare window (if installed). 

control.exe telephony Launches the Phone and Modem Options window. 

control.exe admintools Displays the Administrative Tools folder. 

control.exe schedtasks Displays the Scheduled Tasks folder. 

control.exe netconnections Displays the Network Connections folder. 

control.exe infrared Launches the Infrared Monitor window (if installed). 

control.exe userpasswords Launches the User Accounts window. 


More information about the use-livecode mailing list