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

John Savill

March 25, 2010

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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%MicrosoftWindowsLibraries.

  1. Navigate to %AppData%MicrosoftWindowsLibraries.

  2. Open the library whose icon you want to modify in a text or XML editor. (Notepad will do fine.)

  3. Locate the line


    true

  4. Under this line, insert a new line and replace d:documentsiconsmsflag.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,


    D:Documentsiconsmsflag.ico
  5. Save the file.

    Your complete file may look like this:

    
    
    S-1-5-21-3859382301-3552666755-1537069426-1104
     4
     true
     D:Documentsiconsmsflag.ico
     
     \{7D49D726-3C21-4F05-99AA-FDC2C9474656\}
     
     
     
     
     
     
     true
     true
     
     D:Microsoft
     MBAAAEAFCAAAAAAAADAAAAAAAY0gAAQBQAAAAYoiu9Uo/qcAGqobPF6vKHghK62Th+ryBAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAIMAUAwHQB+TQDi66kGEiiNCAsCMw0ZGA8CR6wFAAAAAAAAAAAAAAAAAAAAAAAAATCQMAAAAAAQa8Q0fQAQTJNkUPNlfxAAAABACAQAAv7ba8Q0fpxDR/pCAAAQYoDAAAAAHAAAAAAAAAAAAAAAAAAAANBQaAMGAyBwbAMHAvBgZAQHAAAAGAsDABAgDA8uvAAAFA8BUg/E0gouOpBhoYjAArADMdmBAvQkOcBAAAAAAAAAAAAAAAAAAAAAAAAAAAgBAAAQaAAAAcAAAAMAAAAAHAAAAxAAAAgDAAAwXAAAAVAAAAMAAAAgN+5B5QAAAAQUY0FGAEpDXAAAAAcCAAAgAAAAAUAAAAAAAAAAAAIAAcx1UBZFRBx0VLNFMxwFRhRXYA0UajJ3bz9mZ0BAKAAAAJAAAgyBAAAQMTB1UirIWGxLT4M0u8PxkmgZbODAAAAAAAAAAgBAAAMAAAAKWAAAAAAAAAMXY2RWYsd3azBTMAAAAAAA8Gpa8Q6xUMRaiHyy4VeyCFtA5QgKKfHBvcBwH8GgnJCvRqGPkeMFTkm4hsMelnsQRLQOEoiy3RwLXA8BvB4ZiAAAAAA
     
     
     
     Your library icon should now be the icon you specified.The default icons used are all found in c:windowssystem32imageres.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!

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like