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.
Step 2. Under the Create Shortcut box, you need to enter ‘C:WindowsSystem32cmd.exe
‘ on the location field and click on the ‘Next’ button.
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.
Step 4. Once done, right-click on the Shortcut file and select ‘Properties’
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
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
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.