When you install Cygwin, it creates a shortcut to the Cygwin.bat file that resides in the installation directory. But if you try to pin it to the Windows 7 taskbar with drag-and-drop, it won’t work. Here’s how you can do it:
- Right-click on the desktop, and in the context menu, select New->Shortcut.
- In the dialog box, enter the location of the shortcut item. If Windows and Cygwin are installed in the default locations, it will be something like:
- Click “Next”. Enter “Cygwin” for the shortcut name. An icon with the C:\ command prompt will appear on your desktop.
- Right-click the icon and view Properties. Click the “Change Icon…” button. Browse to the Cygwin installation directory and select Cygwin.ico.
- Double-click the new desktop shortcut and make sure the Bash shell appears. Right-click the icon in the taskbar and select and select “Pin this program to the taskbar”. You’re done!
C:\Windows\System32\cmd.exe /c C:\cygwin\Cygwin.bat
Alternatively, you could just run cmd.exe, pin it to the taskbar, and edit the properties to run Cygwin.bat while it’s pinned. But then you would not be able to alter the icon as easily.
Doesn’t work. Just pins CMD to taskbar.
Did you follow the numbered steps or did you just use the technique in the last paragraph? I tried it myself to make sure it does in fact work. Is anybody else having problems with this?
Interesting: if I follow your instructions, it works. If I open the desktop shortcut that the cygwin installer created, it fails as”asdf” described.
In any case, thanks for providing this workaround. Guess Win7 is still miles behind OS X 🙂
Carl
Worked for me, thanks!
Glad to see this is working for most people.
Thanks! usefull tip!!
Great workaround! Works for me. Thanks!
Worked perfect, thanks!
Thanks for the tip. I found this and now I use it for other apps that I need to start via cmd. Actually, it is fairly simple to change the icon after you have pinned it to the taskbar. (i.e. your “alternative” solution). Just R-click on the pinned icon, and again R-click on the app name. You can then select the properties option and change your icon under the “Shortcut” tab.
Thanks! It works out nicely!
Thank you.
Works for me. Thanks!!
Your tip worked great! Thanks! One question… why couldn’t I pin the original Cygwin shortcut that it created on my desktop? Why don’t they do what you described here?
Those who are having problems should make sure not to use the batch file but to make sure they’re using the location said above which points first to the cmd.exe
I made that mistake 😛
(Reblogged this)
I also had asdf’s problem, but I found a solution. I followed the steps exactly and the shortcut it created worked just fine. When i tried to pin it, though, all it would pin is a shortcut to the windows command prompt.
I un-pinned it and took another look at the properties on my shortcut. It looks like despite the fact that I pasted:
C:\Windows\System32\cmd.exe /c C:\cygwin\Cygwin.bat
as the shortcut target, windows changed it to just “C:\cygwin\Cygwin.bat”. All I had to do to fix it was re-open the shortcut’s properties and change the target back to:
C:\Windows\System32\cmd.exe /c C:\cygwin\Cygwin.bat
Then I re-launched the shortcut and right-clicked the task bar icon and told it to pin. Now everything works.
No clue why windows changed the target path…
it works!! thx 🙂
Perfect! Thanks
Thank you! Works like a charm.