Change folder icon


  1. Posts : 13
    Windows 7 x64
       #1

    Change folder icon


    Hi,
    I wrote a batch script to set a custom icon to folders:

    ECHO [.ShellClassInfo]>%1\desktop.in_
    ECHO IconResource=C:\Windows\system32\imageres.dll,22>>%1\desktop.in_
    move %1\desktop.in_ %1\desktop.ini
    attrib +S +H %1\desktop.ini



    The desktop.ini it produces is identical to the one when doing the process manualy:

    [.ShellClassInfo]
    IconResource=C:\Windows\system32\imageres.dll,22


    But it doesn't work. It only works if I set the folder icon manually.
    Anyone?
      My Computer


  2. Posts : 13
    Windows 7 x64
    Thread Starter
       #2

    Found the solution:

    the folder must be ReadOnly:

    ECHO [.ShellClassInfo]>%1\desktop.in_
    ECHO IconResource=C:\Windows\system32\imageres.dll,22>>%1\desktop.in_
    move %1\desktop.in_ %1\desktop.ini
    attrib +S +H %1\desktop.ini
    attrib +R %1
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:52.
Find Us




Windows 10 Forums