TechNet Forum Windows 7 Support Team

Pining a .BAT/.CMD File to Taskbar

Pining a .BAT/.CMD File to Taskbar

  • Comments 8
  • Likes

When a .BAT file or a shortcut pointing to a .bat file is opened, we will not find an option to "Pin the program to taskbar”; and we can’t neither drag nor drop the file to the taskbar.


The .CMD file has the same behavior as the .BAT file.




Please perform the following steps to pin a .BAT/.CMD file to taskbar:


1.      Pin a shortcut for cmd.exe to the taskbar.


2.      Right click the shortcut on the taskbar and you will see a list that includes "Command Prompt" and "Unpin this program from the taskbar".


3.      Right click the icon for Command Prompt and select properties.


4.      In the box for Target, go to the end of "%SystemRoot%\system32\cmd.exe" and add "/C" (without quotations) and the path and name of the batch file.


5.      Then the batch file will be pinned to the taskbar.


For .CMD files, you also can try the same procedures.

  • This method works well for a single file. Unfortunately it won't let you pin multiple files. Is there any way to do that?

  • a simple application which you can pin to your taskbar that will then allow you to pin batch files to it.

  • That doesn't make any sense. you can't add /C to the end of a .exe, Adding an additional path to the end of that, especially one thats something like C:/windowsetc makes even less sense. You are talking out of your ass.

  • This worked like a champ, thanks...
    %windir%\system32\cmd.exe /C C:\Users\Claudio\Downloads\PingTest.bat

  • Worked extremely well, and for the confused, /c is a command line switch for cmd.exe to tell it to launch a command shell for the .bat/.cmd file to be executed in... Post no Bills...

  • Yep, worked as advertised. If you want to change the icon of the link, make sure you do it before you pin it to the taskbar.

  • Doesn't work. Not ever a little bit.

  • No, it does not work unless someone is in error about spacing IN the TARGET line, but:
    C:\Windows\System32\cmd.exe /C C:\Program Files (x86)\xxxxx\yyy.bat
    Just blinks at you. This BAT if executed as a BAT file, runs TWO programs, one after the other perfectly
    Something is missing.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment