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

Brian Borg's answer at technet explains how to Pin a batch file to the Taskbar in Windows 7. I was able to do that in Windows 7 and it worked fine.

But I'm unable to make it work in Windows 8. The explanation doesn't make the syntax clear for adding the path and filename of the batch file. It's been several years since I did it in Windows 7 so I may not have done this part right, but I have tried every combination I can think of.

Here are a few examples I've tried:

"C:\Windows\System32\cmd.exe" "/C" C:\Users\[username]\winbats\dogbones.bat
"C:\Windows\System32\cmd.exe" "/C" "C:\Users\[username]\winbats\dogbones.bat"
"C:\Windows\System32\cmd.exe" /C C:\Users\[username]\winbats\dogbones.bat
C:\Windows\System32\cmd.exe /C C:\Users\[username]\winbats\dogbones.bat
C:\Windows\System32\cmd.exe /C "C:\Users\[username]\winbats\dogbones.bat"

They all open a command prompt, but none executed the batch file.

Does anyone know the correct syntax or another way to pin a batch file to the taskbar in Windows 8?

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, Randolph West, Mokubai, Simon Sheehan, Shekhar Oct 16 '13 at 2:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Not a duplicate since this question is for Windows 8 – TomEus Oct 9 '13 at 18:18
This is not a duplicate. How do we get it unmarked as a duplicate? – oldmankit Mar 25 '15 at 11:20

PIN to home screen (Start):

  1. Navigate to %AppData%\Microsoft\Windows\Start Menu\Programs
  2. Create a shortcut to your .bat script and rename it to how you want it to appear on start screen, i.e. My Script
  3. Optional - change shortcut icon if you wish
  4. Go to the Start Screen and search for the name you gave to your shortcut in step 2
  5. Select My Script and click on Pin to Start or Pin to taskbar

And this will allow both home screen (Start) and taskbar:

  1. Right click on your Desktop and choose New > Shortcut
  2. In the Type the location of the item field enter: cmd.exe /c "path\to\script.bat"
  3. Replace path\to\script.bat with actual path to your .bat file.
  4. Click Next, name the shortcut and click Finish.

The pinning:

  • To Pin the .bat file to the Start home screen, right click the new shortcut and choose Pin to Start.
  • To Pin the .bat file to the taskbar, simply drag the shortcut to your Windows taskbar, or right click the new shortcut and choose Pin to Taskbar.
share|improve this answer

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