Change a folder icon
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Change a folder icon
Is there a way to change a folder icon through a script (talking about in Windows, not in rev). I've looked for a VBscript, but haven't found one yet.
Hi Keyless,
It must be possibly to do this using the registry, but I haven't found out how, yet. A little bit of information can be found here: http://vbrocks.net/vbstuff.htm
Best,
Mark
It must be possibly to do this using the registry, but I haven't found out how, yet. A little bit of information can be found here: http://vbrocks.net/vbstuff.htm
Unfortunately, this doesn't seem to apply to XP and Vista and I believe the information is incomplete, but at least this gives you an impression of what you need to look for.The icons you see every day in your Windows Explorer are not very nice. You can find some really neat on the Internet. Or you can even create your very own special icons using a handy tool such as Icon Easel.
To me there was a bigger problem not to paint them in eyecatching colors but actually install the icons so Windows starts using them. To display mine instead of those crazy ones.
The secret is buried in the Windows 2000 Registry. But not very deep.
Can you see the registry path in the piece of code below? That's it. But before you start copying the code I want to explain you something else.
All icons in the Windows Explorer have numbers. Here are some:
3- folder icon, 4- open folder icon, 30- trash can, etc.
If you have a simple program such as ResExplorer (from Borland) you can see what are the numbers of the icons in the Shell32.DLL file that resides in the System32 folder. Subtract 1 from the icon number you see in the DLL and you will have the number you can use in the Registry.
Now we are back to the Registry. If you've drawn your own Folder icon and want it to replace the Folder icon displayed by Windows you have to do the following.
- place your icon's .ICO file to a separate folder (needless to say, your icon file should contain at least 2 images- one 32x32 and one 16x16 pixels).
- start Notepad.EXE.
- copy and paste the following three lines into the Notepad. Replace "myfolder" and "myicon" with real names of the directory and file.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
"3"="c:\\myfolder\\myicon.ico,0"
and this icon will replace the one having #3 ,the Folder Icon
some notes: you have to replace a single backslash character with two of them when you work with Registry just like it is displayed in the line above, and you probably have to restart Windows (or restart the Explorer)
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
This one turned out to be super easy, no reg or script needed. Info is all kept in a hidden file in each folder: Desktop.ini
one can make your own or edit a desktop.ini for a folder.
so I just create the file from rev. Contents of the file is this:
nice and easy.
one can make your own or edit a desktop.ini for a folder.
so I just create the file from rev. Contents of the file is this:
Code: Select all
[.ShellClassInfo]
IconFile=%USERPROFILE%\Desktop\Pictures\Purple.ico
IconIndex=0