Opening the Command Prompt and running some commands every time is somewhat a tedious job. Are you also bored of using it constantly? If yes, then why not use a double-clickable desktop shortcut rather than typing and executing some specific commands? This can be helpful if you run some CMD commands frequently.
By the way, Windows provides you various ways to open the Command Prompt but typing and executing the same command may become tiresome sometimes. To make it easy, read this post and we will show you an easy tweak to run Command Prompt commands with a desktop shortcut. So let’s get started
Run Command Prompt commands with a Desktop Shortcut
Running Command Prompt commands with a Desktop shortcut is a quite simple process that doesn’t require much knowledge. All you just need to follow the method mentioned below:
First of all, you have to create a Command Prompt shortcut.
To do this, right-click anywhere on the empty space on your Desktop screen and then select New > Shortcut.
Doing this, the Windows will open a Create Shortcut pop-up window right away.
Here you need to give the location of the item you want to execute whenever you run the shortcut.
To do so, type the below text line and then click on the Next button:
C:\Windows\System32\cmd.exe
The above path will call the cmd executable file to run the Command Prompt.
Read: How to Clear Clipboard using Shortcut, CMD, or Context Menu.
On the next page, it will ask you to name the shortcut as you wish. After naming it, click on the Finish button to create the shortcut.
Once it is done, right-click on the Shortcut file and select Properties from the context menu.
In the Properties window, make sure you’re on the Shortcut tab.
Now go to the Target field and add /k followed by your CMD command.
It will look something like – C:\Windows\System32\cmd.exe /k followed by the command you want to add.
Here “/k” tells Command Prompt to execute the command that you type after it.
Note: If you need to add more shortcuts, just repeat the above procedure.
In case you want to edit the previously created shortcut command, then simply right-click on it and select the Properties option. After that, add the new command under the Target field.
Command Prompt Desktop Shortcut for running System File Checker
For instance, you can create the shortcut command for running the System File Checker tool. To create it, type the below command under the target field:
C:\Windows\System32\cmd.exe /k sfc /scannow
This will tell the Command Prompt to run the System File Checker tool to scan the damaged and corrupted system files.
Command Prompt Desktop Shortcut for checking the response from Google
In the same way, you can check how fast you get a response from Google. Since ping is measured in milliseconds, you will have to use the command:
C:\Windows\System32\cmd.exe" /k ping www.google.com
Once you complete the process, run a command via the shortcut instead of opening the Command Prompt and typing the same commands each time.
Read: Create a single desktop shortcut to open multiple web pages.
Furthermore, if you want to run multiple commands using the Windows 11/10 Shortcut, you only need to add an ampersand (&) between the commands.
For example:
C:\Windows\System32\cmd.exe /k echo Welcome & echo World
This will print Welcome World.
Here you don’t need to use “/k” for each further command. Assign it with the first command and will do the rest.
I hope you find this article helpful and you’ll be able to create Command Prompt shortcuts for executing different commands quickly and easily. In case of any queries, do leave a comment in the Comments section below.
What is the shortcut to run the Command Prompt?
Several shortcuts can be used to quickly launch the Command Prompt on a Windows 11/10 PC. To open Command Prompt using the Run dialogue, press Win + R (opens Run dialogue), type ‘cmd’, and press Enter (or press Ctrl + Shift + Enter to open Command Prompt as administrator). To open Command Prompt using File Explorer, press ‘Win + E’ (opens File Explorer), then press ‘Alt + D’ (focuses the cursor into the address bar), type ‘cmd’, and press Enter.
How to open cmd without windows key?
You may use the Task Manager app to open Command Prompt without pressing the Windows key on your PC. Press Ctrl + Shift + Esc to open Task Manager. Click the Run new task option in the upper-right corner. Type ‘cmd’ in the Create new task window and press the Enter key. Alternatively, type ‘cmd’ in the Windows Search bar and press Enter; or click the ‘Run as administrator’ option to open Command Prompt with administrative privileges.
Read Next: Command Prompt not working or opening in Windows.