Last Updated on July 4, 2020 by Larious
Some users use Command Prompt daily. Some use to flush the DNS every time they get an internet error; and some use it to reset the DNS cache, some use it to find the IP address. Here we have shared an easy method to RUN CMD Commands with a desktop shortcut on Windows 10.
If you have been using Windows operating system for a while, then you might be well aware of CMD or Command Prompt. It’s one of the most powerful tools in Windows, which is used to operate a wide range of tasks. It’s a command-line interpreter that can be used to access some of the core features of Windows.
There were lots of users who use Command Prompt daily. Some use to flush the DNS every time they get an internet error; some use it to reset the DNS cache, and some use it to find the IP address. So, if you are amongst those who use CMD at regular intervals, then this post might be beneficial to you.
How to RUN CMD Commands With a Desktop Shortcut on Windows 10
In this article, we are going to share a method that would let you run CMD commands directly from the desktop. For that, we need to create a command prompt shortcut on the desktop. Once created, you can make the desktop shortcut to execute the CMD command of your wish.
Step 1. First of all, Right-click on the desktop, and select – New > Shortcut.
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 23 select - New > Shortcut](https://lowkeytech.com/wp-content/uploads/2020/07/How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
Step 2. Under the Create Shortcut box, you need to enter ‘C:WindowsSystem32cmd.exe
‘ on the location field and click on the ‘Next’ button.
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 24 enter 'C:WindowsSystem32cmd.exe' on the location field](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_703_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 25 enter 'C:WindowsSystem32cmd.exe' on the location field](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_703_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
Step 3. In the final step, you would be asked to type a name for the new shortcut. Simply name it as per your wish.
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 26 type a name for the new shortcut](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_433_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 27 type a name for the new shortcut](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_433_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
Step 4. Once done, right-click on the Shortcut file and select ‘Properties’
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 28 Select 'Properties'](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_341_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 29 Select 'Properties'](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_341_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
Step 5. Under the ‘Target’ field, you need to enter ‘/k followed by your CMD command‘
The target field would look like this after the modification – "C:WindowsSystem32cmd.exe" /k echo hello world
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 30 The target field](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_483_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 31 The target field](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_483_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
Note: The "/k"
between the command tells the command prompt to run the command that you will type after it.
Similarly, you can try the automatic ping command – "C:WindowsSystem32cmd.exe" /k ping www.google.com
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 32 Another example of target field](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_755_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
![How to RUN CMD Commands With a Desktop Shortcut on Windows 10 33 Another example of target field](https://lowkeytech.com/wp-content/uploads/2020/07/1593846087_755_How-to-RUN-CMD-Commands-With-a-Desktop-Shortcut-on.jpg)
To flush the DNS cache, you need to create a shortcut with – "C:WindowsSystem32cmd.exe" /k ipconfig /flushdns
Important: Make sure to remove the double Apostrophe (“) symbols from the target fields, or else it will not work.
For a complete list of important CMD commands, you can visit our article –
So, this article is all about how to run Command Prompt commands with desktop shortcuts on Windows 10. I hope this article helped you! Share it with your friends also.