Pining a .BAT/.CMD File to Taskbar
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.
Method
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.
Comments
Anonymous
September 29, 2011
This method works well for a single file. Unfortunately it won't let you pin multiple files. Is there any way to do that?Anonymous
December 18, 2011
johnastevens.com/helpTopics.aspx a simple application which you can pin to your taskbar that will then allow you to pin batch files to it.Anonymous
November 21, 2014
The comment has been removedAnonymous
November 22, 2014
This worked like a champ, thanks...
%windir%system32cmd.exe /C C:UsersClaudioDownloadsPingTest.batAnonymous
February 03, 2015
The comment has been removedAnonymous
February 27, 2015
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.Anonymous
July 13, 2015
Doesn't work. Not ever a little bit.Anonymous
August 22, 2015
The comment has been removedAnonymous
October 21, 2015
add quotations to paths containing spaces!Anonymous
November 16, 2015
Follow Patrick's comment. The correct spacing is needed. I've just added a .BAT to taskbar, works perfectly. Cheers Patrick :)Anonymous
November 26, 2015
Works perfectly, thank you. This works for several shortcuts as well, not just one. For every shortcut you intend to use just make an additional command prompt shortcut and apply the command instructed above. Reading the directions usually points to success for future reference to those of you claiming "this does not work". First attempt with flying colors, thank you again.Anonymous
January 28, 2016
Works well. Make sure you leave a space after cmd.exe.
ie. ...cmd.exe /c C:Program Files...filename.bat