How to Run commands of Command Prompt with a Desktop Shortcut

The Windows Club

Opening the command prompt and running certain commands each time is a bit of a tedious job. Are you also bored of using it constantly? If so, then why not use a double-clickable desktop shortcut rather than typing and running specific commands. This can be useful if you frequently run certain CMD commands.

By the way, Windows gives you different ways to open the Command Prompt, but typing and running the same command can get tedious sometimes. To make it easier for you, read this article and we’ll show you an easy adjustment 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 fairly straightforward process that doesn’t require a lot of knowledge. You just need to follow the method mentioned below:

First, you need to create a Command Prompt shortcut.

To do this, right click on the empty space of your desktop screen then select New> Shortcut.

By doing this, Windows will immediately open a pop-up window.

Here you need to indicate the location of the item you want to run every time you run the shortcut.

To do this, type the line of text below, and then click the Next button:

C:WindowsSystem32cmd.exe

Run the Command Prompt commands with a desktop shortcut.

This will call the cmd executable file to run the command prompt.

Lily: How to clear clipboard using shortcut, CMD or context menu.

On the next page, it will ask you to name the shortcut whatever you want. After naming it, click on the finish button to create the shortcut.

Once done, right click on the shortcut file and select Properties in the context menu.

In the Properties window, make sure you are on the Shortcut tongue.

Now go to the Target field and add / k tracking your CMD order.

It will look something like – C: Windows System32 cmd.exe / k tracking the order you want to add.

Run Command Prompt commands with a shortcut

Here, “/ k” tells the command prompt to run the command you type after.

Note: If you need to add more shortcuts, just repeat the above procedure.

If you want to modify the shortcut command created earlier, just right click on it and select the Properties option. After that add the new command under the Target field.

For example, you can create the shortcut command to run the System File Checker tool. To create it, type the command below under the target field:

C:WindowsSystem32cmd.exe /k sfc /scannow

This will tell the command prompt to run the System File Checker tool to scan for damaged and corrupted system files.

Likewise, you can check how fast you get a response from Google. Since the ping is measured in milliseconds, you will need to use the command:

C:WindowsSystem32cmd.exe" /k ping www.google.com

Once the process is complete, run a command through the shortcut instead of opening the Command Prompt and typing the same commands each time.

Lily: Create a single desktop shortcut to open multiple web pages.

Also, if you want to run multiple commands using Windows 10 shortcut, just add an ampersand (&) between the commands.

For example:

C:WindowsSystem32cmd.exe /k echo Welcome & echo World

This will print Welcome World.

Here you don’t need to use “/ K” for each additional order. Assign it with the first command and do the rest.

I hope you find this article useful.

Run Command Prompt commands with a desktop shortcut

Leave a Reply