Pin the Cygwin icon on the Windows 7 dock

From Stack Overflow
Jump to: navigation, search

From http://andrewtwest.com/2010/05/17/how-to-create-a-pinned-cygwin-icon-in-windows-7/

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:

1. Right-click on the desktop, and in the context menu, select New->Shortcut.
2. 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:
 C:\Windows\System32\cmd.exe /c C:\cygwin\Cygwin.bat
3. Click “Next”.  Enter “Cygwin” for the shortcut name.  An icon with the C:\ command prompt will appear on your desktop.
4. Right-click the icon and view Properties.  Click the “Change Icon…” button.  Browse to the Cygwin installation directory and select Cygwin.ico.
5. 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!

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.
Personal tools