CMD: Create Shortcut To Command Line/Dos Programs

Simple way to create shortcuts to command line programs. You favorite cmd is only one click away.

Command line shortcuts on the desktop? What’s next, dogs and cats living together in harmony?

1. Right click on an empty space on the desktop to open the context menu
2. Select New
3. Select Shortcut with a left-click
4. In the location box type cmd /k plus whatever command you want.

For example, if you want a shortcut to ping tech-recipes, your location box would contain:

cmd /k ping

example of command prompt on desktop

5. Select Next

6. Name your shortcut and push Finish

This works on all versions of windows including Windows 7 and Windows 8.

Example of this tutorial on windows 8.

The Conversation

Follow the reactions below and share your own thoughts.

26 Responses to “CMD: Create Shortcut To Command Line/Dos Programs”

  1. March 25, 2009 at 12:27 pm, nal said:



  2. April 25, 2009 at 6:06 pm, ben said:

    this does not work if ur administrator has blocked it (on ur school computer)


    • May 05, 2009 at 4:16 pm, polytonality said:

      Try the pressing the ‘Windows’ and ‘R’ keys at the same time to bring up “Run”; then, type CMD and press ‘Enter’. Might work, depending on user permissions….


      • November 02, 2012 at 7:15 pm, R said:

        I tried windows key and r on school computer and it’s blocked.


    • February 19, 2010 at 10:19 am, Anonymous said:

      lol just make a new file and type CMD in it then save it as somthing.bat and run it!


  3. October 16, 2009 at 8:51 pm, Anonymous said:

    This is exactly what I was looking for. I had been monitoring my ping by doing “ping -t” in the command box, but when I started doing it almost daily I figured I should find a way to automate it instead of typing every time. (Of course, it’s probably better if you have a good ping app, but this works and it’s easy.)

    Also, the site I was pinging was not That was just an example.


  4. January 06, 2010 at 7:45 pm, Anonymous said:

    Thank you for your shortcut info cmd /k to emulation shell. How can I extend this shortcut to start a dos program such as 123r23.exe ?


  5. March 08, 2010 at 2:18 pm, Name said:

    hey im at school theyve blocked cmd is there away to get it up easily without system32 and the likes


  6. April 24, 2010 at 11:45 am, Varun said:

    Thanks for
    I have been looking for this since long…


  7. May 21, 2010 at 2:34 pm, bow said:

    please help,about that knowladge….please sent to my email..thnaks


  8. May 21, 2010 at 2:34 pm, bow said:

    how,to make shortcut from dos……..


  9. July 15, 2010 at 9:34 am, Ravi_mht2005 said:

    ok this is nice tips


  10. December 01, 2010 at 4:10 am, Vikas pal said:



  11. December 02, 2010 at 12:00 pm, Mathias_pk said:

    lol, thanks to you i have learned how to make a fake / prank virus :-)
    make the shortcut and type:

    cmd k shutdown -r -f -c “WARNING! your computer has detected a fatal virus and will now restart. All data will be lost after restart.” -t 59

    than change the icon of the shortcut at (right mouse) properties > change icon
    type in the upper text box pifmgr.dll (press enter and it will give you a list of nice icons to chose from)
    than you change the name of the shortcut into something that will fit with the icon and make it look like a simple nice game.

    after that when you will open it, it will give you 59 seconds and then the computer will simply restart. at the other hand, people who don’t know this will read, and think that they have installed a virus..

    if you want to test this to see if it works correctly without having to restart your computer, than you can make another shortcut:

    cmd /k shutdown -a

    this will abort the shutdown after you double click on it. :)


    • January 01, 2013 at 9:33 pm, rich h said:

      Your computer will shut down on Friday and blow up. hahaha


  12. April 05, 2011 at 4:18 am, Imtiyaz Shaikh said:

    Thanks, Its working. :)


  13. September 10, 2011 at 11:47 pm, azeem said:

    thhhhhhanks much


  14. September 26, 2011 at 5:56 am, jrexz said:

    thanks a lot!
    just the one that im lookin for


  15. January 26, 2012 at 11:09 am, selva said:

    thank you working fine


  16. February 04, 2012 at 6:30 pm, Leonard said:



  17. November 16, 2012 at 11:44 pm, Nabil L. said:

    Very very very Helpful. This is what i allways wanted on my desktop.
    This shortcut is better than The Dude Monitor LOL.


  18. January 22, 2013 at 12:44 am, Bob said:

    Why would you ever waste your time with all this cmd line stuff when you could just drag the address bar to wherever you wanted the shortcut to be and instantly have a shortcut to tech-recipes ?


  19. March 26, 2013 at 11:44 am, me2 said:

    Thanks, that’s what I was looking for!


  20. July 26, 2013 at 1:35 pm, Christine Lisi said:

    Thanks! Exactly what I was looking for (that /k). :)


  21. July 31, 2013 at 11:23 am, Makco10 said:




  22. March 18, 2014 at 12:11 pm, Foysol said:

    Thanks a lot bro.
    If i want to makes a shortcut of 2 ATTRIBUTE commands to hide & protect a specific command of my pen-drive, then what i will write?
    (cmd /k attrib H R L:/ adult)?
    Here i don’t know the drive as it change each time in each port.
    Please mail me.


Leave a Reply