Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are having trouble adding our batch scripts to the Windows 7, 8 or 10 taskbar or start menu.

Our batchfiles take some arguments and just execute other application based on those arguments . To keep it simple, we created some shortcuts for our customers which they just need to click in order to get everything running.

The question here is: How can we pin those shortcuts or batch files to the taskbar or start menu?

(The customers aren't supposed to access the file system and that's why they can only see the taskbar)

share|improve this question
up vote 271 down vote accepted
  1. Create a shortcut to your batch file.
  2. Get into shortcut property and change target to something like: cmd.exe /C "path-to-your-batch".
  3. Simply drag your new shortcut to the taskbar. It should now be pinnable.
share|improve this answer
Such a simple solution. Strange that pinning of direct shortcuts to batch files is not supported. – Steve Crane Feb 7 '11 at 8:16
Thanks, this also works for Windows 8 – jao Aug 21 '12 at 17:16
And if your annoyed that a cmd window pops up every time you use the shortcut, after pinning, you can open the shortcut at C:\Users\<User name>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar and change the target path back to path-to-your-batch – apple16 Nov 1 '12 at 22:53
The names and icons stick after you pin the item, so it is good to also perform step 2.5: Change the name and icon of the shortcut. – JohnEye Apr 5 '13 at 13:49
What does /C in cmd.exe /C "path-to-your-batch" exactly mean? – Daniel Krizian Apr 7 '15 at 12:36

This thread nearly answers my problem, another thread worth reading that solves these issues in a different way is here:Adding Batch Files to Windows 7 Taskbar like the Vista/XP Quick Launch

I was able to add a batchfile to the taskbar by the following steps:

  1. Renaming your .cmd/.bat to to .exe
  2. Right clicking on the *.exe and choose pin to taskbar
  3. Renaming it back to .cmd/.bat
  4. Shift+right clicking the taskbar icon (for the exe) and choose properties
  5. Changing the reference from *.exe to .cmd/.bat and change icon as needed

It starts working right away but the icon refresh needs a reboot.

I have an additional question though: how do you get a pinned taskbar batch file accepting another file as a parameter? It works when pinned onto the startbar, or just in the folder, but I can't get it working like it did on XP.

This is the functionality I'm talking about:

Drag and drop a file on the bat icon. The bat will receive the file name of the dropped file as %1 and vbscript will receive it as WScript.Arguments(0).

share|improve this answer
+1. I liked that this works without creating extra files. – Vlueboy Sep 25 '12 at 11:51
+1 No need to have a separate shortcut to the batch. And you don't actually need to reboot, you can just kill off explorer.exe and re-run it from task manager for the icon to refresh. – stylez Sep 29 '12 at 16:53
I'd be happy if i weren't crying about why this is appearantly still necessary. Thanks, @daniel. appearantly this is still true for win8/10 – Timothy Groote Mar 2 at 10:23

The folder for the Windows 7 taskbar is located at:

C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

The Start Menu folder is:

C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu

You can create a shortcut there and upon logging off and back on, it should appear.

Hope this helps.... There are other things I should caution you about, for example, they can right click and edit the batch file - so, you may want to look at NTFS permissions for locking down the file.

share|improve this answer
This approach didn't work with shortcuts.. – Shaharyar Jan 25 '10 at 12:36
Also tried adding a new shortcut here, and it did not show up in the taskbar after restarting explorer.exe. – eidylon May 24 '10 at 14:38

Yes this is an annoying "feature" of the windows 7 taskbar. I built a simple application that runs batch files which you can pin to your taskbar and pin batch files to it. It gets the job done. Download it for free ->

share|improve this answer
Works like a charm. The only thing missing is that when you just click RunBatch it does nothing, it would be nice if it opens the command prompt. – Jochen Jan 5 '11 at 14:35
Thanks for taking the effort to write and make this available but it seems a bit of an over the top approach when the solution given by Kamil Klimek is so simple. – Steve Crane Feb 7 '11 at 8:15

You must log in to answer this question.

protected by studiohack Apr 27 '11 at 1:13

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .