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.