Personal Blog

How to Pin Anything to the Taskbar

Lately I had a deploy batch and I noticed how somehow it was unpinnable to the taskbar on Windows 7 (and it seems it also behaves like this on Windows 8). So here are 2 possible solutions:

  1. Create a shortcut to the file you want to pin
  2. Click on Properties and change the Target to “cmd.exe /C
    (You can also change the icon to whatever you want)
  3. Drag the Shortcut to the TaskBar

The second solution might not work every time, the trick is to deceive the TaskBar, here’s how:

  1. Rename your file extension to “.exe”
  2. Drag the file to the TaskBar
  3. Rename the file extension back to the original
  4. Right click the Pinned File, click on Properties and change the target file’s extension back to the original (The icon will be correct after you reboot)

If the 2nd solution works for you, stick to it, as there is no need for any extra file (the shortcut) and doesn’t need to run the file through the command line.

For a direct approach you can also go to “C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar” and simply create a shortcut to any file you want.