How to Run Command Prompt Commands With a Desktop Shortcut

Joel Lee 05-10-2016

If there’s a certain command that you want to run at will on a regular basis, you’ve probably grown tired of the cycle of launching the Command Prompt, typing in the command, closing the Command Prompt. There’s got to be a better way! And there is.


This method involves a creating file shortcut to cmd.exe, which is the Command Prompt application, and supplying a command as a parameter. When a parameter is supplied to Command Prompt, it’s automatically run when launched.

  1. Right-click anywhere in File Explorer or the Desktop and select New > Shortcut.
  2. For the location of the item, type in "C:\Windows\System32\cmd.exe" /k [your desired command here] making sure to replace the bracketed text with the command you want to run 15 Windows Command Prompt (CMD) Commands You Must Know The command prompt is still a powerful Windows tool. Here are the most useful CMD commands every Windows user needs to know. Read More . Don’t actually type the brackets.
  3. Click Next.
  4. Give the shortcut a name.
  5. Click Finish.


Change /k to /c if you want the Command Prompt to close after running the command. You can include multiple commands by adding an & in there, such as [command one] & [command two] & [command three].

You can also do something similar using Windows batch scripts, which are only a little more complicated. Just create a batch file, edit it to contain the command you want to run, save it, then double-click it.

Did this help? Know of any other ways to quick-run commands in the Command Prompt just by double-clicking a shortcut? Share with us in the comments below! And keep in mind that the Command Prompt is the quickest way to install Windows software The Quickest Way to Install Windows Software: The Command Prompt Installing apps on Windows takes up a lot of time. Install and update your apps through the command prompt with this method. Read More .


Explore more about: Command Prompt, Windows Tricks.

Whatsapp Pinterest

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Tul
    March 1, 2019 at 4:14 pm

    Thank you for a great, super simple and direct article, with no superlative bs. Thanks

  2. quadstrike
    October 18, 2016 at 4:19 am

    or just make a bat file

  3. John Merc
    October 6, 2016 at 7:47 am

    Nice and Helpful article.
    However I want to know where is login link in this new website?
    And what about my saved articles?

    Thanks in advance.

  4. ultimate tech news
    October 5, 2016 at 12:45 pm

    wow great article