Skip navigation

Q. How can i change the icon for my custom library?

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. true

  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. <iconReference>D:\Documents\icons\msflag.ico</iconReference>
  7. Save the file.
  8. Your complete file may look like this:

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

    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!

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish