Open built-in window by a command

Solution 1:

Adding a real answer to your question because existing answers do not address this.

But actually my question is how to find those command about any windows?

▶ All control panel applets are registered in Registry database under HKCR\CLSID. This is described in MSDN article How to Register Executable Control Panel Items.

Example: You can find there for example this registry key and its data:

{A8A91A66-3A7D-4424-8D24-04E180695C7A}

System.ApplicationName: Microsoft.DevicesAndPrinters    (← this is value you can refer to) System.ControlPanel.Category: 2

So the Windows creates list of all such keys (Registry "folders") which qualify and creates Control Panel items from them.

Summary: You can learn all commands available in your Windows from Registry. Use Nirsoft RegScanner to list all registered items at once (or their related commands etc.) by searching for specific registry value, for example System.ApplicationName.

Further reading (main topic): Implementing Control Panel Items

Solution 2:

.cpl files are usually Control Panel widgets. Typing sysdm.cpl in the Run box is the same as if you went to the Control Panel, clicked on System, then clicked on Advanced System Settings. You can access just about any Control Panel item if you know the name of its actual command. The My Computer properties window you mentioned can be accessed by a keyboard shortcut of Win+Pause/Break.

https://www.groovypost.com/howto/windows-10-keyboard-shortcuts/ has a very comprehensive list of shortcut keys you can use and items you can type into the Run box to go directly to a variety of Windows settings and options.

Solution 3:

Per this Microsoft article —

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

The command works because you are directly accessing a Windows control panel applet (the .cpl extension) by name via the Run command (Win + R).

sysdm

This same file is linked to certain selections in Control Panel\System and Security\System as well, such as Advanced system settings or changing your computer's name.

If I right-click ThisPC and then I click Properties, I can open a properties window. Can I open this window with another command in Win+R?

To access Control Panel\System and Security\System (which is the same as right-clicking ThisPCProperties) there is a different method — Win + R then type "control system".

control panel

control panel 32

As you can see, "system" acts as a parameter to control.exe (indicating which panel to show).

How can I find these commands to Run any given window?

Please forgive me if I misunderstand anything or go over anything you already know. =)

Unfortunately, similar to @techturtle, I am not aware of any command to list just the possible Control Panel options directly.

Update: As @miroxlav's answer suggests, you can use utilities to go through the registry. This could have the added benefit of identifying custom, non-standard Control Panel items (such as those installed by certain software or by a computer manufacturer).

Specifically for the Control Panel, there is also sometimes overlap between commands. For instance, "control date/time", "control /name Microsoft.DateAndTime", "control timedate.cpl" and "timedate.cpl" all bring up the Date/Time settings panel on Windows 7/8/10.

Control Panel Item Lists

However, there are some helpful lists produced by Microsoft. In addition to the official list of default Control Panel applets/commands linked earlier, Microsoft also has a listing of all the canonical (official) names for every default Control Panel item.

This second set of items can generally be opened with Win + R and then by entering "control /name" along with the proper name listed e.g "Microsoft.Troubleshooting".

Troubleshooting Example

Notes

  • For clarity, some of these commands may not work with Start → Search (e.g. "sysdm.cpl" will but "control access.cpl" will not). All commands should be run with Win + R (as you have).

  • This blog entry seems to have a good list of duplicate Control Panel commands.

  • In case you remember what a panel looks like but can't recall its name, this link seems to have a pretty complete list of all the possible control panel items with screenshots. Currently you have to click on "Show Full Article" to see all the entries.

  • @techturtle's Groovypost link is interesting because it has command-line/Run details for non-Control Panel items as well, such as Microsoft Management Console Snap-Ins (ending with .msc). These could be useful since e.g. something like the Services panel is not part of the Control Panel but it can be started with "services.msc".