Executing or Opening Control Panel Items
Sometimes you have to open or access Control Panel Items via a script or you want to open it for a remote client and it is kind of hard to come up with a command line to address that issue. Microsoft has posted in their MSDN website (http://msdn2.microsoft.com/En-US/library/bb419052.aspx) information regarding how to do this.
Most importantly, if your application wishes to open an item in the Control Panel you use:
WinExec("c:windowssystem32control.exe MyCpl.cpl", SW_NORMAL);
And if you simply wish to open something like the Printers and Faxes folder, take a look at this (obtained as is from the website mentioned above):
Legacy Control Panel Commands
When you use the WinExec function, the system can recognize special
Control Panel commands. These commands predate Windows Vista.
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. |
Alternatively you can try something like:
::{2227A280-3AEA-1069-A2DE-08002B30309D}
That would open the Printers and Faxes if ran from the Start–>Run Menu. You can probably leverage this and use similar IDs for different things in Windows.
Love
Can we use Let's Encrypt, the free and open certificate authority?
Hola! gracias por la info, me sirvió el comando sacandole el nombre del server. En mi caso, fue una migración…
Yes 3rd option helped me too. I removed the WC key Values from config file then started working.
I know this is from 2014. But really, thank you!