A. When you create custom libraries in Windows 7, you get a very generic icon, and there's no obvious graphical way to change this. To modify the icon, you need to update the XML file that represents the library, which is found in %AppData%\Microsoft\Windows\Libraries.

  1. Navigate to %AppData%\Microsoft\Windows\Libraries.
  2. Open the library whose icon you want to modify in a text or XML editor. (Notepad will do fine.)
  3. Locate the line

  4. <isLibraryPinned>true</isLibraryPinned>

  5. Under this line, insert a new line and replace d:\documents\icons\msflag.ico with the name of your icon file. If you're using a DLL or EXE, also specific the index ID of the icon to be used. For example,

  6. &lt;iconReference&gt;D:\Documents\icons\msflag.ico&lt;/iconReference&gt;
  7. Save the file.
  8. Your complete file may look like this:

    &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;libraryDescription xmlns="http://schemas.microsoft.com/windows/2009/library"&gt;<br />&lt;ownerSID&gt;S-1-5-21-3859382301-3552666755-1537069426-1104&lt;/ownerSID&gt;<br /> &lt;version&gt;4&lt;/version&gt;<br /> &lt;isLibraryPinned&gt;true&lt;/isLibraryPinned&gt;<br /> <strong>&lt;iconReference&gt;D:\Documents\icons\msflag.ico&lt;/iconReference&gt;</strong><br /> &lt;templateInfo&gt;<br /> &lt;folderType&gt;\\{7D49D726-3C21-4F05-99AA-FDC2C9474656\\}&lt;/folderType&gt;<br /> &lt;/templateInfo&gt;<br /> &lt;propertyStore&gt;<br /> &lt;property type="boolean"&gt;&lt;!\\[CDATA\\[true\\]\\]&gt;&lt;/property&gt;<br /> &lt;/propertyStore&gt;<br /> &lt;searchConnectorDescriptionList&gt;<br /> &lt;searchConnectorDescription&gt;<br /> &lt;isDefaultSaveLocation&gt;true&lt;/isDefaultSaveLocation&gt;<br /> &lt;isSupported&gt;true&lt;/isSupported&gt;<br /> &lt;simpleLocation&gt;<br /> &lt;url&gt;D:\Microsoft&lt;/url&gt;<br /> &lt;serialized&gt;MBAAAEAFCAAAAAAAADAAAAAAAY0gAAQBQAAAAYoiu9Uo/qcAGqobPF6vKHghK62Th+ryBAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAIMAUAwHQB+TQDi66kGEiiNCAsCMw0ZGA8CR6wFAAAAAAAAAAAAAAAAAAAAAAAAATCQMAAAAAAQa8Q0fQAQTJNkUPNlfxAAAABACAQAAv7ba8Q0fpxDR/pCAAAQYoDAAAAAHAAAAAAAAAAAAAAAAAAAANBQaAMGAyBwbAMHAvBgZAQHAAAAGAsDABAgDA8uvAAAFA8BUg/E0gouOpBhoYjAArADMdmBAvQkOcBAAAAAAAAAAAAAAAAAAAAAAAAAAAgBAAAQaAAAAcAAAAMAAAAAHAAAAxAAAAgDAAAwXAAAAVAAAAMAAAAgN+5B5QAAAAQUY0FGAEpDXAAAAAcCAAAgAAAAAUAAAAAAAAAAAAIAAcx1UBZFRBx0VLNFMxwFRhRXYA0UajJ3bz9mZ0BAKAAAAJAAAgyBAAAQMTB1UirIWGxLT4M0u8PxkmgZbODAAAAAAAAAAgBAAAMAAAAKWAAAAAAAAAMXY2RWYsd3azBTMAAAAAAA8Gpa8Q6xUMRaiHyy4VeyCFtA5QgKKfHBvcBwH8GgnJCvRqGPkeMFTkm4hsMelnsQRLQOEoiy3RwLXA8BvB4ZiAAAAAA&lt;/serialized&gt;<br /> &lt;/simpleLocation&gt;<br /> &lt;/searchConnectorDescription&gt;<br /> &lt;/searchConnectorDescriptionList&gt;<br /> &lt;/libraryDescription&gt;

    Your library icon should now be the icon you specified.

    The default icons used are all found in c:\windows\system32\imageres.dll and are icon numbers 1001 to 1008. If you are short of icons, take a look in this file with an icon browser and you may be able to use one!