Pinterest Stumbleupon Whatsapp
Ads by Google

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 7 Quick Tips to Improve the Windows Command Prompt 7 Quick Tips to Improve the Windows Command Prompt You should learn more about the Command Prompt. It's a more valuable resource than most people realize. These tips will improve your command line experience, even if you're a seasoned user. Read More , 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 CMD Commands Every Windows User Should Know 15 CMD Commands Every Windows User Should Know The command prompt is an antiquated tool from an era of text-based input. But some commands remain useful and Windows 8 even added new features. Find out which ones. Read More . Don’t actually type the brackets.
  3. Click Next.
  4. Give the shortcut a name.
  5. Click Finish.

windows-10-command-as-desktop-shortcut

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 Dip Your Toes in Batch File Programming for Windows Dip Your Toes in Batch File Programming for Windows Why do you let simple, repetitive tasks bore you? If you can't delegate, innovate! With Windows you can create simple little programs, called batch files, that will take care of these tiresome tasks. Read More , 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!

Ads by Google

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

    or just make a bat file

  2. 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.

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

    wow great article

Leave a Reply

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