Pin a batch file to the Start menu or taskbar in Windows 10

Sometimes you need to pin a batch file to the Start menu or taskbar in Windows. Unfortunately, the operating system doesn't allow you to do it out of the box. "Pin to Start" and "Pin to taskbar" context menu commands are missing in the context menu of File Explorer in Windows 10. Here is a quick workaround which will allow you to achieve the goal.


When you right click a batch file, you will see that the context menu does not contain the commands "Pin to Start" and "Pin to taskbar":
no pin context menu
As a workaround, you can create a shortcut with the following target:

cmd /c "path to your batch file"

This will execute the batch file and close the command prompt window. Double quotes are so that you can use long file names in the path.
If you use the following shortcut target:

cmd /k "path to your batch file"

Then the command prompt will remain open after the batch file finishes running.
When you right click such a shortcut, it will include the context menu commands to pin to Taskbar or Start!

Here is what you need to do.

  1. Right click on the Desktop and select the command "New -> Shortcut" from the context menu. Windows 10 new shortcut
  2. In the shortcut target, type the following text:
    cmd /c "full path to your batch file"

    In my example, it will be

    cmd /c "C:\Users\winaero\Desktop\test.cmd"

    shortcut target

  3. Name the shortcut and change its icon if you need: shortcut name
  4. Now, right click the shortcut and choose "Pin to Start" from the context menu: Windows 10 pin batch file to start

You are done. The result will be as follows: Windows 10 pinned batch file to start Windows 10 pinned batch file to start 2

That's it.

7 thoughts on “Pin a batch file to the Start menu or taskbar in Windows 10

  1. Bert McLees

    hmmm… still don’t get the option of pinning to start.. bat file works fine… ideas?

    Like or Dislike: Thumb up 1 Thumb down 0

    Reply
    1. Sergey Tkachenko Post author

      Follow the instruction carefully. You shortcut should point to the cmd.exe file.

      Like or Dislike: Thumb up 1 Thumb down 0

      Reply
    2. ruben

      Once you have the shortcut on your desktop, you can drag it to the taskbar.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
  2. Jeffrey Bue

    I tried this multiple times and {sigh} I can’t get it to work. The short cut gets created, but when I double-click it, the batch files doesn’t run… no errors… just doesn’t run.

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply
    1. Gabriel

      Try
      cmd /c “[path to batch].bat”
      instead of
      cmd /c “[path to batch].cmd”
      It worked for me.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
    2. Padraic

      Don’t use a .bat file – type the command straight into the shortcut.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
  3. Michael Wonderland

    Fast Easy solution: Rename your .bat file to .exe and then drag to task bar. Then right click the shortcut on the taskbar, select properties, and rename back to .bat .. and rename the original file back to .bat

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply

Leave a Reply

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