- Windows commands
- Prerequisites
- Command shell overview
- Command-line reference A-Z
- What Does CMD /C Means In Windows MS-DOS Command-line Tutorial with Examples?
- Run Command and Terminate with CMD /C
- Run Command and Terminate with CMD /C On-Run Command Prompt
- Run Command and Terminate with CMD /C On Search Prompt or Box
- Run Command and Terminate with CMD /C On-Run Command Prompt
- Run Multiple Commands
- Run Bat File and Terminate
- Run Command and Return To CMD Prompt with CMD /K
- What Does CMD /C Means In Windows MS-DOS Command-line Tutorial with Examples?
- Run Command and Terminate with CMD /C
- Run Command and Terminate with CMD /C On-Run Command Prompt
- Run Command and Terminate with CMD /C On Search Prompt or Box
- Run Command and Terminate with CMD /C On-Run Command Prompt
- Run Multiple Commands
- Run Bat File and Terminate
- Run Command and Return To CMD Prompt with CMD /K
- What is Windows Terminal?
- Multiple profiles supporting a variety of command line applications
- Customized schemes and configurations
- Custom actions
- Unicode and UTF-8 character support
- GPU accelerated text rendering
- Background image support
- Command line arguments
- 25 Run Commands in Windows You Should Memorize
- How to open the Run dialog?
- #1. Access System Configuration — “msconfig”
- #2. Access Resource Monitor — “resmon”
- #3. Open System Information — “msinfo32”
- #4. Access Backup and Restore window — “sdclt”
- #5. Access mouse properties — “main.cpl”
- #6. Open Windows Registry — “regedit”
- #7. Access System Properties — “sysdm.cpl”
- #8. Manage Windows Power options — “powercfg.cpl”
- #9. Open Windows Features — “optionalfeatures”
- #10. Open Magnifier — “magnify”
- #11. Open Character Map app — “charmap”
- #12. Access Network Connections — “ncpa.cpl”
- #13. Run Malicious Software Removal Tool — “mrt”
- #14. Open Device Manager — “devmgmt.msc”
- #15. Manage User Accounts — “netplwiz”
- #16. Open Services app — “services.msc”
- #17. Access Programs and Features window — “appwiz.cpl”
- #18. Open Control Panel — “control”
- #19. Open current user folder — “.” (period)
- #20. Open On-Screen Keyboard — “osk”
- #21. Open Snipping Tool — “snippingtool”
- #22. Open Windows Memory Diagnostic — “mdsched”
- #23. Open any website — “Insert website URL”
- #24. Open Remote Desktop Connection — “mstsc”
- #25. Open Command Prompt — “cmd”
- Wrapping up
Windows commands
All supported versions of Windows (server and client) have a set of Win32 console commands built in.
This set of documentation describes the Windows Commands you can use to automate tasks by using scripts or scripting tools.
Prerequisites
The information that is contained in this topic applies to:
- Windows Server 2019
- Windows Server (Semi-Annual Channel)
- Windows Server 2016
- Windows Server 2012 R2
- Windows Server 2012
- Windows Server 2008 R2
- Windows Server 2008
- Windows 10
- Windows 8.1
Command shell overview
The Command shell was the first shell built into Windows to automate routine tasks, like user account management or nightly backups, with batch (.bat) files. With Windows Script Host you could run more sophisticated scripts in the Command shell. For more information, see cscript or wscript. You can perform operations more efficiently by using scripts than you can by using the user interface. Scripts accept all Commands that are available at the command line.
Windows has two command shells: The Command shell and PowerShell. Each shell is a software program that provides direct communication between you and the operating system or application, providing an environment to automate IT operations.
PowerShell was designed to extend the capabilities of the Command shell to run PowerShell commands called cmdlets. Cmdlets are similar to Windows Commands but provide a more extensible scripting language. You can run Windows Commands and PowerShell cmdlets in Powershell, but the Command shell can only run Windows Commands and not PowerShell cmdlets.
For the most robust, up-to-date Windows automation, we recommend using PowerShell instead of Windows Commands or Windows Script Host for Windows automation.
You can also download and install PowerShell Core, the open source version of PowerShell.
Incorrectly editing the registry may severely damage your system. Before making the following changes to the registry, you should back up any valued data on the computer.
To enable or disable file and directory name completion in the Command shell on a computer or user logon session, run regedit.exe and set the following reg_DWOrd value:
To set the reg_DWOrd value, use the hexadecimal value of a control character for a particular function (for example, 0 9 is Tab and 0 08 is Backspace). User-specified settings take precedence over computer settings, and command-line options take precedence over registry settings.
Command-line reference A-Z
To find information about a specific command, in the following A-Z menu, click the letter that the command starts with, and then click the command name.
What Does CMD /C Means In Windows MS-DOS Command-line Tutorial with Examples?
MS-DOS is an operating system and shell used to run commands and provide a command-line interface in Windows operating systems. cmd.exe is used to interpret and provide a console for the MS-DOS command. cmd.exe provides different options where cmd /c is a popular one. cmd /c is used to run commands in MS-DOS and terminate after command or process completion.
Run Command and Terminate with CMD /C
We can run commands in MS-DOS or in cmd.exe by using cmd /c . We will also add the command string we want to run. For example, if we want to run ping poftut.com we will issue the following command. The command will create a process that will run command and then terminate after the command execution is completed. Also using ” double quotes in order to surround command are very useful.
Run Command and Terminate with CMD /C On-Run Command Prompt
We can run cmd /c and related commands from the Run Command prompt. We can open Run Command Prompt from the Start menu or with the Windows Key+R key combination and write the cmd /c «ping poftut.com» command like below. Keep in mind that after the execution of the command is completed the MS-DOS windows will be terminated or closed automatically.
Run Command and Terminate with CMD /C On Search Prompt or Box
Another alternative to run commands with the cmd /c we can use Search Prompt or Box. We will click to the Start Menu and write down the complete command. This will also show the command with the MS-DOS icon like below. This will work like previous examples.
Run Command and Terminate with CMD /C On-Run Command Prompt
Alternatively, we can run cmd /c command from a regular command line or MS-DOS. This will open a new MS-DOS shell and run given command. After the command execution is over the newly created MS-DOS shell will be terminated or closed automatically.
Run Multiple Commands
We can run multiple commands with the cmd /c . We just need to provides them in double-quotes by separating them with space. In this example, we will run ping poftut.com , ping google.com , mkdir test in the following example.
Run Bat File and Terminate
Bat or batch files are used to run multiple commands from a file. This will make recurring tasks easier. We can run a bat file by providing its path and name to the cmd /c like below. In this example, we will run the batch file backup.bat
Run Command and Return To CMD Prompt with CMD /K
As stated previously cmd /c will run given the command and terminate a new shell or process after the command is completed. If we do not want to terminate a new process we can use /K option where a newly created process or window will remain without closing.
What Does CMD /C Means In Windows MS-DOS Command-line Tutorial with Examples?
MS-DOS is an operating system and shell used to run commands and provide a command-line interface in Windows operating systems. cmd.exe is used to interpret and provide a console for the MS-DOS command. cmd.exe provides different options where cmd /c is a popular one. cmd /c is used to run commands in MS-DOS and terminate after command or process completion.
Run Command and Terminate with CMD /C
We can run commands in MS-DOS or in cmd.exe by using cmd /c . We will also add the command string we want to run. For example, if we want to run ping poftut.com we will issue the following command. The command will create a process that will run command and then terminate after the command execution is completed. Also using ” double quotes in order to surround command are very useful.
Run Command and Terminate with CMD /C On-Run Command Prompt
We can run cmd /c and related commands from the Run Command prompt. We can open Run Command Prompt from the Start menu or with the Windows Key+R key combination and write the cmd /c «ping poftut.com» command like below. Keep in mind that after the execution of the command is completed the MS-DOS windows will be terminated or closed automatically.
Run Command and Terminate with CMD /C On Search Prompt or Box
Another alternative to run commands with the cmd /c we can use Search Prompt or Box. We will click to the Start Menu and write down the complete command. This will also show the command with the MS-DOS icon like below. This will work like previous examples.
Run Command and Terminate with CMD /C On-Run Command Prompt
Alternatively, we can run cmd /c command from a regular command line or MS-DOS. This will open a new MS-DOS shell and run given command. After the command execution is over the newly created MS-DOS shell will be terminated or closed automatically.
Run Multiple Commands
We can run multiple commands with the cmd /c . We just need to provides them in double-quotes by separating them with space. In this example, we will run ping poftut.com , ping google.com , mkdir test in the following example.
Run Bat File and Terminate
Bat or batch files are used to run multiple commands from a file. This will make recurring tasks easier. We can run a bat file by providing its path and name to the cmd /c like below. In this example, we will run the batch file backup.bat
Run Command and Return To CMD Prompt with CMD /K
As stated previously cmd /c will run given the command and terminate a new shell or process after the command is completed. If we do not want to terminate a new process we can use /K option where a newly created process or window will remain without closing.
What is Windows Terminal?
Windows Terminal is a modern terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and Windows Subsystem for Linux (WSL). Its main features include multiple tabs, panes, Unicode and UTF-8 character support, a GPU accelerated text rendering engine, and the ability to create your own themes and customize text, colors, backgrounds, and shortcuts.
Multiple profiles supporting a variety of command line applications
Any application that has a command line interface can be run inside Windows Terminal. This includes everything from PowerShell and Command Prompt to Azure Cloud Shell and any WSL distribution such as Ubuntu or Oh-My-Zsh.
Customized schemes and configurations
You can configure your Windows Terminal to have a variety of color schemes and settings. To learn how to make your own color scheme, visit the Color schemes page. You can also find custom Terminal configurations in the Custom terminal gallery.
Custom actions
There are a variety of custom commands you can use in Windows Terminal to have it feel more natural to you. If you don’t like a particular keyboard shortcut, you can change it to whatever you prefer.
For example, the default shortcut to copy text from the command line is ctrl+shift+c . You can change this to ctrl+1 or whatever you prefer. To open a new tab, the default shortcut is ctrl+shift+t , but maybe you want to change this to ctrl+2 . The default shortcut to flip between the tabs you have open is ctrl+tab , this could be changed to ctrl+- and used to create a new tab instead.
You can learn about customizing shortcuts on the Actions page.
Unicode and UTF-8 character support
Windows Terminal can display Unicode and UTF-8 characters such as emoji and characters from a variety of languages.
GPU accelerated text rendering
Windows Terminal uses the GPU to render its text, thus providing improved performance over the default Windows command line experience.
Background image support
You can have background images and gifs inside your Windows Terminal window. Information on how to add background images to your profile can be found on the Profile — Appearance page.
Command line arguments
You can set Windows Terminal to launch in a specific configuration using command line arguments. You can specify which profile to open in a new tab, which folder directory should be selected, open the terminal with split window panes, and choose which tab should be in focus.
For example, to open Windows Terminal from PowerShell with three panes, with the left pane running a Command Prompt profile and the right pane split between your PowerShell and your default profile running WSL, enter:
Learn how to set up command-line arguments on the Command line arguments page.
25 Run Commands in Windows You Should Memorize
Using Run commands in Windows is a very efficient way to access different Windows settings and apps directly.
If you memorize Run commands, you can access a particular app in just 2 steps instead of many clicks.
I personally don’t like frequently reaching out for the mouse; therefore, I have memorized all the required keyboard shortcuts and commands to minimize my interaction with the mouse. And Run commands are core for my day-to-day PC usage to accesses different Windows settings and apps efficiently.
If you are looking to be productive, then I will recommend you to memorize Run commands. To get you started, I will list some of the frequently used commands that I find most useful for day-to-day use.
How to open the Run dialog?
To use Run commands, you need to know how to open the Run dialog to enter the commands. There are two ways to access the Run dialog in Windows 10.
You can either press the Windows+R keys on the keyboard or right-click on the start menu and select Run from the menu.
I will recommend you to use the keyboard shortcut as it’s much faster and you won’t have to use the mouse. Once the Run dialog is open, enter any of the below mentioned commands and press the Enter key or click on the OK button to execute it.
#1. Access System Configuration — “msconfig”
Starting with my favorite command, the System Configuration window consists of multiple tabs to manage boot settings and background services.
If you have a dual boot setup or often need to access safe mode, you will often need to access these settings. Don’t forget to check its Tools section for convenient access to some of the most powerful Windows tools.
#2. Access Resource Monitor — “resmon”
A very powerful app to see real-time information about your system resources like CPU, RAM, disk, and network. For any computer hanging or performance-related issues, this is the best tool to get the information you need.
#3. Open System Information — “msinfo32”
System Information app offers extensive information about both the hardware and software of your PC. It’s a must-know command if you need to see the specs of any PC. The information is well laid out using dedicated categories, and you can export the information to a file to share with anyone — perfect for getting online tech assistance.
#4. Access Backup and Restore window — “sdclt”
It opens the backup and restores window where you can either set up a backup of your PC or restore it from an old backup if there is a problem with your PC.
#5. Access mouse properties — “main.cpl”
You can control all the settings related to your computer mouse here. This includes mouse speed, buttons, wheel, and pointer, etc.
#6. Open Windows Registry — “regedit”
If you ever need to access the Windows registry to tweak something, this is the easiest way to do it. I didn’t even know other ways to access the Registry until recently, and I often mess around in the Registry. Other ways are simply too cumbersome to use.
#7. Access System Properties — “sysdm.cpl”
Another powerful settings window to manage system protection and remote connection features. I personally access it often to manage the Performance settings under the Advanced tab. You can manage some interesting performance-boosting options there.
#8. Manage Windows Power options — “powercfg.cpl”
You will find all the options to manage your PC’s power options here. There are a plethora of options to both save power or get better performance. Check this guide to optimize the power options as you find best.
#9. Open Windows Features — “optionalfeatures”
Here you can disable/enable some of the most advanced features of Windows. I wouldn’t recommend you to mess around here if you don’t know what you are doing. You will need to use this window if you ever need to enable features like Telnet client or Hyper-V.
#10. Open Magnifier — “magnify”
This opens the Windows magnifier to magnify the content on the screen up to 1600% if needed. It also has a screen reader built-in to read aloud text on the screen.
#11. Open Character Map app — “charmap”
Windows Character Maps lets you access All the characters in the font of your choice to easily use anywhere you like. You can either copy the character or learn its Alt code to enter anywhere you like. Using the search bar is the easiest way to find the character you need.
#12. Access Network Connections — “ncpa.cpl”
Here you can manage your current network connection and fix any problem with the network device. You can enable/disable the network, check the current status, bridge connections, or see your Wi-Fi password.
#13. Run Malicious Software Removal Tool — “mrt”
It’s an on-demand virus removal tool provided by Microsoft to scan your PC and find any malicious software. If you think your PC got infected by a virus, you can quickly launch this tool to scan your PC.
You can also consider installing antivirus software to keep your Windows computer safe.
#14. Open Device Manager — “devmgmt.msc”
Device Manager is the go-to place to manage everything related to your hardware components and their drivers. You can enable/disable hardware components or manage their drivers, like uninstalling or updating them.
#15. Manage User Accounts — “netplwiz”
You can quickly manage user accounts here, such as adding a new account or user account types like Administrator or Standard. You can also change the user accounts password here and manage their security.
#16. Open Services app — “services.msc”
This app lists all the services that work in the background without an interface and make all the features work in Windows. Again, you shouldn’t mess with any services if you don’t know what you are doing. However, you can click on a service to learn what it does in the left panel. There are many services that you can enable/disable depending on your need. For example, I have disabled the Bluetooth service as I don’t use it.
#17. Access Programs and Features window — “appwiz.cpl”
Although Windows 10 has its own setting to uninstall an app, I still use this command as it only shows third-party apps. The default Windows uninstaller shows all apps, including built-in apps, which are 30+. It can be difficult to always go through so many apps to uninstall a recently installed app. This command makes the process a snap.
#18. Open Control Panel — “control”
This command didn’t hold much value in the older version of Windows as you could easily access Control Panel using different ways. However, in Windows 10, Microsoft promotes the new Settings over the old Control Panel, so it doesn’t offer an easy way to access the Control Panel. This simple command lets you easily access it.
#19. Open current user folder — “.” (period)
We have to access the user folder quite often in Windows, but going through the explorer to access it isn’t needed. Just type a period in the Run dialog, and the current user’s folder will open up.
#20. Open On-Screen Keyboard — “osk”
If you want to use the on-screen keyboard, then using the Run command is one of the quickest ways to do it.
#21. Open Snipping Tool — “snippingtool”
Snipping Tool is still the go-to tool for taking screenshots in Windows 10 without using a third-party app. If you use the Snipping Tool for taking screenshots, then this Run command will make it easier.
#22. Open Windows Memory Diagnostic — “mdsched”
If you think there is a problem with your RAM, this tool can check your RAM and possibly fix the problem or let you know there is an issue. If you start seeing sudden freezes or crashes, it could mean there is a problem with your RAM.
#23. Open any website — “Insert website URL”
You can also enter the URL of any website in the Run dialog, and it will open it in your default browser. For example, if you type www.geekflare.com in the Run command, it will open the Geekflare home page in your default browser.
#24. Open Remote Desktop Connection — “mstsc”
You can use this feature to remotely connect to another PC and take full control over it. You’ll have to set up both PCs for the remote connection first, though. This Run command just makes the process easier.
#25. Open Command Prompt — “cmd”
Unlike PowerShell, you can’t access the Command Prompt by right-clicking on the start menu anymore. If you prefer using the Command Prompt over PowerShell to execute commands, this is one of the easier ways to open the Command Prompt.
Wrapping up
The cool thing about Run is that it remembers all the commands you type in it. Therefore, you will only have to type the first letter to enter the command in the future.
I also believe Run commands are more important in Windows 10 as it heavily promotes the use of its default Settings app. Most of the settings and apps that I have mentioned above are more difficult to access Windows 10.
Next, explore some of the best NirSoft utilities for Windows.