Last Updated |
Click a heading below to reveal the tips.
See help on customising and using reg files.
See Icon Finder to view standard Windows icons and find their Icon Index.
REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Icons] "Number from list below"="Path to icon, Icon index"
The list below specifies the number for the default shell icons.
The path to icon is a dos path to the icon, in a registry file remembe to use \\ (regedit rmoves one \ when merging).
The icon index is used when the icons are coming from a binary file like a .dll or .exe. It is the position of the icon in the file (a negitive number is the inverse of the resource ID). Omit the comma and Icon Index when using an .ICO file.
To get the index create a shortcut, right click and choose Properties, then Change Icon, then Browse. Select the file and click open. The icons are numbered from 0 downwards then across.
Icons can also be set under the Default Icon setting for the object in HKEY_ROOT (which is where Windows stores its' icon information), the Shell Icon setting overrides this.
Value | Description |
0 | Unknown File Type |
1 | Default Document |
2 | Default Application |
3 | Folder |
4 | Open Folder |
5 | 5.25 inch Floppy |
6 | 3.5 inch Floppy |
7 | Removable Drive |
8 | Hard Drive |
9 | Network Drive |
10 | Network Disconnected |
11 | Cd-rom Drive |
12 | Ram Drive |
13 | Globe |
14 | Network Pipes ? |
15 | Desktop |
16 | Print Manager |
17 | Network Neighborhood |
18 | Workgroup |
19 | Program |
20 | Document Folder |
21 | Settings |
22 | Find |
23 | Hint |
24 | Command |
25 | Screen Saver |
26 | Docking |
27 | Display |
28 | Sharing Overlay (Hand) |
29 | Shortcut Overlay (Small Arrow) |
30 | Default Printer Overlay (Small Tick) |
31 | Recycled Empty |
32 | Recycled Full |
33 | Dial-up Networking |
34 | Desktop |
35 | Control Panel |
36 | Program Groups |
37 | Printers |
38 | Font |
39 | Start Menu settings |
40 | Audio Cd |
44 | Log Off |
45 | May not apply to Win98 |
46 | May not apply to Win98 |
Download a zip file called OpenFolder.zip containing a green open icon and registry file that makes the current open folder in Explorer green.
You can also set custom icons for individual drives. This reg file is for drive C, the drive is the second last part of the key without a colon.
REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\DriveIcons\C\DefaultIcon] "@"="Path to icon, Icon index"
You can also set custom icons for individual folders.
Copy the following lines into a file called Desktop.ini and save it in the folder you want to customise. This file may exist in the folder in which case edit the file and add or edit the following lines. This as written sets the icon to a tree, see Shell Icons tip on this page for how to find an icon index.
If designing your own icons you can use a bitmap file (bmp). A good size is 16 x 16 for small icons and 32 x 32 for large. When using bitmaps as icons the colour of the upper left pixel becomes the invisible colour. If the icon and desktop.ini file are in the same directory there is no need for a path.
[.ShellClassInfo] IconFile=C:\WINDOWS\SYSTEM\shell32.dll IconIndex=41 InfoTip=An optional description for the folder that displays in a pop up tip and web view when selected
This file usually has its' hidden attribute set, though it doesn't have to. Right click it and choose Properties then check the Hidden checkbox.
The folder it's stored in also needs to have its' system or read only attribute set. Type in a MS-Dos command prompt or Start - Run dialog box one of the following,
Attrib +s Foldername Attrib +r Foldername
or right click and choose properties to set the read only attribute.
Remember to enclose filenames in quotation marks if it contains a space.
There is a tip about setting the system attribute on the context menu page, especially if you're going to be doing a fair bit of this.
Download eight Custom Icons (customicons.zip) suitable for custom folder icons.
Dlls (Dynamic Link Libraries), OCXs (Active X controls), and CPLs (Control Panel Applets) are all DLLs. Nearly all CPLs and OCXs have an icon builtin while a fair few DLL do too.This sets these files to use their builtin icons rather than the default generic icon they use. DLLs without a builtin icon will use unknown file type.
Copy the following line into a new Text Document and call it anything.reg. Double click it.
To change back to the default use a semicolan to comment out the @="%1" and remove semicolans from @="C:\\WINDOWS\\SYSTEM\\shell32.dll,-154".
REGEDIT4 ;Use a semicolan to comment out the @="%1" and remove semicolans from @="C:\\WINDOWS\\SYSTEM\\shell32.dll,-154" to undo changes ;Sets Control Panel Applets to display their own icons [HKEY_CLASSES_ROOT\cplfile\DefaultIcon] ;@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-154" @="%1" ;Sets Dynamic Link Libraries to display their own icons [HKEY_CLASSES_ROOT\dllfile\DefaultIcon] ;@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-154" @="%1" ;Sets Dynamic Link Libraries (OCX) to display their own icons [HKEY_CLASSES_ROOT\ocxfile\DefaultIcon] ;@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-154" @="%1"
Windows treats bitmaps (bmp or Bitmap Image files) as icons. Therefore with a simple registry edit bitmaps will show a picture of themselves as a icon.
SetBitmapIcons.vbs tests that Bitmap Image (bmp) files are associated with Picture.Paint because a lot of bitmap editors take the extension and set it to themselves (which is the incorrect way of doing it). If it's not associated with Picture.Paint then it offers to reassociate Bitmap Images to Picture.Paint. The icons cannot be changed if it's not associated with Picture.Paint. You are only prompted to change the association to Picture.Paint if it's not already associated.
It then tests if the icon is already set to display its' own picture. If it is, it offers to restore the Window's default which is Icon 1 in MSPaint, if not it offers to set it to a picture of the bitmap.
The icon cache file is then deleted and it advises that a restart of Windows is necessary. See the note in the file if Windows is not installed in its' default directories or if directories short file name has been changed.
'SetBitmapIcons.vbs 'Displays and/or changes the default association for bitmaps and can change them to use a picture of themselves as the icon. ' 'Serenity Macros http://www.angelfire.com/biz/serenitymacros 'David Candy davidc@sia.net.au ' '----------------------------------------------------- 'N O T E * * * N O T E * * * N O T E 'Edit strPbrush with the path to MSPaint (in case it's different from the default) '---------------------------------------------------- ' On Error Resume Next strPbrush="C:\PROGRA~1\ACCESS~1\MSPAINT.EXE,1" strTitle="Set Bitmap Icon" strPbrush="C:\PROGRA~1\ACCESS~1\MSPAINT.EXE,1" Dim Sh Set Sh = WScript.CreateObject("WScript.Shell") ReportErrors "Creating Shell" Msgbox "Set Bitmap Icons checks the file association for bitmaps, can restore them to the Windows default if they have been changed, and can set the icon to be a picture of the bitmap or set it back to the Windows default icon." & vbCRLF & vbCRLF & "You will be prompted for each action.", vbInformation + vbOKOnly, strTitle If Sh.RegRead("HKCR\.bmp\") ="Paint.Picture" then SetIcon Else If MsgBox("Bitmaps are associated with " & Sh.RegRead("HKCR\.bmp\") & vbcrlf & vbcrlf & "Would you llike to associate bitmaps back to Paint?",vbQuestion + vbYesNo + vbDefaultButton2, strTitle) =6 then Sh.RegWrite "HKCR\.bmp\", "Paint.Picture" SetIcon Else Msgbox "Bitmap associations not changed. Cannot set icon for bitmaps unless their associated with Paint.Picture (usually Paint).", vbInformation + vbOKOnly, strTitle End If End If ReportErrors "Main" VisitSerenity '--------------------------------------------------------- Sub SetIcon On Error Resume Next If Sh.RegRead("HKCR\Paint.Picture\DefaultIcon\") <>"%1" then If MsgBox("Icons are set to show as Windows default icon." & vbCRLF & vbCRLF & "This will set the default icon for bitmaps to a picture of the bitmap." & vbCRLF & vbCRLF & "Continue?",vbQuestion + vbYesNo + vbDefaultButton2, strTitle) =6 then Sh.RegWrite "HKCR\Paint.Picture\DefaultIcon\","%1" Msgbox "Bitmap icons should now be a picture of the bitmap." & vbCRLF & vbCRLF & "You'll need to restart Windows", vbInformation + vbOKOnly, strTitle FlushIconCache Else Msgbox "Bitmap icons were not changed", vbInformation + vbOKOnly, strTitle End If Else If MsgBox("Icons are set to show as a picture of the bitmap." & vbCRLF & vbCRLF & "This will set the default icon for bitmaps to Windows default" & vbCRLF & vbCRLF & "If Windows is not installed on the C drive, MSPaint is not installed, or Program Files\Accessories folder has a non standard short file name then choose No and edit this file with the correct path name." & vbCRLF & vbCRLF & "Continue?",vbQuestion + vbYesNo + vbDefaultButton2, strTitle) =6 then Sh.RegWrite "HKCR\Paint.Picture\DefaultIcon\",strPbrush Msgbox "Bitmap icons should now be Windows default icon. " & vbCRLF & vbCRLF & "You'll need to restart Windows", vbInformation + vbOKOnly, strTitle FlushIconCache Else Msgbox "Bitmap icons were not changed", vbInformation + vbOKOnly, strTitle End If End If ReportErrors "SetIcon" End Sub '--------------------------------------------------------- Sub FlushIconCache On Error Resume Next Dim fso Set fso = CreateObject("Scripting.FileSystemObject") FSO.DeleteFile sh.ExpandEnvironmentStrings("%windir%") & "\ShellIconCache", true If err.number=53 then err.clear ReportErrors "FlushIconCache" End Sub Sub ReportErrors(strModuleName) If err.number<>0 then Msgbox "Error occured in " & strModuleName & " module of " & err.number& " - " & err.description & " type" , vbCritical + vbOKOnly, "Something unexpected" Err.clear End Sub Sub VisitSerenity If MsgBox("This program came from the Serenity Macros Web Site" & vbCRLF & vbCRLF & "Would you like to visit Serenity's Web Site now?", vbQuestion + vbYesNo + vbDefaultButton2, "Visit Serenity Macros") =6 Then sh.Run "http:\\www.angelfire.com\biz\serenitymacros" End If End Sub
The setting for icons are stored here in the registry. There are other icon settings, but they can be changed with the Display - Appearance and Web Tabs in Control Panel and the Folder Options on the View menu in Explorer. The Explorer Options section on this page control the title wrapping
The first is in pixels, and the second is in bits per pixel
REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics] "Shell Small Icon Size"="16" "Shell Icon Bpp"="16"
The size of the icon cache is stored here in icons. This is the default. Increase this if Windows often shows the wrong icon or no icons.
REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] "Max Cached Icons"="4000"
These are the settings set with Control Panel. Choosing Use Large Icons on the Effects page of the Display Control Panel applet sets Shell Icon Size to 48.
REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics] "IconSpacingFactor"="100" "IconFont"=hex:06,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,4d,53,20,\ 53,61,6e,73,20,53,65,72,69,66,00,c7,2d,89,00,08,00,00,00,00,00,00,00,90,01,\ 00,00,00,00 "IconSpacing"="-1125" "IconVerticalSpacing"="-1125" "Shell Icon Size"="32"
This is the setting set with Explorer Options
REGEDIT4 "IconTitleWrap"="1"
There are plenty of freeware icon editors about. Imagedit and Aniedit (animated cursors) are available in both the Windows 95 and 98 resource kits.
To refresh the icons in the system change the size of icons in Start - Control Panel - Display - Appearance, click apply then change the size back.
In Windows the Namespace paradigm replaces the drive/directory paradigm of MS-Dos and Windows 3.1. While the file system is still an important part of the namespace it's detined to be less so in the future. The namespace refers to objects in the Windows' shell and their relationship to each other. The top object in the name space is the Desktop, with My Computer, Recycle Bin, and My Documents as the next level.
Some objects in the namespace are files or folders and some are not. Control Panel is not a filesystem folder but contains a type of objects stored is the system directory. The namespace defines ways of viewing and manipulating objects.
When explorer shows a view of a folder it determines if it's part of the file system or if it has a namespace extension attached. If it has a namespace extension then explorer and the extensions program code work out how to display it. When viewing an extension to the namespace the underlying files (if any) are not being shown - but the view that the extension's program shows which may or may not show the actual files.
To show this start File Manager (type winfile in the Start - Run dialog box, make sure show Hidden Files is checked in File Manager's View menu - File Types) and view the folder c:\recycled. If the recycled bin is empty you'll see a desktop.ini and a file called info2, if you have deleted files in the Recycled Bin you'll see the files with names like DC0.the original exyension. These are the actual files deleted and their names are stored in the info2 file. Each hard drive has it's own Recycled folder with files deleted from that drive.
When the Recycled Bin is viewed in Explorer, Explorer loads the Recycled Bin program code and this code looks in all drives and retrieves all the file names from all the Info2 files and gives Explorer a list of all files deleted on the computer. Explorer itself only knows how to ask for a list of the contents of a folder.
If you are on a network browse to another computer's Temporary Internet Files folder (usually C:\Windows\Temporary Internet Files) and you'll see the files in your Temporary Internet Files. This is because Explorers loads the Temporary Internet Files program code which is designed to show the contents of your Temporary Internet Files.
There are three methods to add an extension to the shells namespace (the shell is only one of many - Outlook has it's own namespace);
When a folder that is part of the file system has it's Read Only or System attribute set, explorer looks for a file in that folder called desktop.ini (which may or may not be invisible in Explorer) and sees if it has a line like this one from the desktop.ini in c:\recycled
[.ShellClassInfo] CLSID={645FF040-5081-101B-9F08-00AA002F954E}
Explore then looks up this number (a CLSID) in the following registry key
HKEY_CLASSES_ROOT\CLSID
and this key has entries that tell Explorer where to find the program code to ask what is in the folder.
The Desktop.ini is documented elsewhere on this page, see Setting Icons for Individual Folders and Desktop.ini Syntax.
This topic is incomplete. Will be finished soon
Name | CLSID |
Control Panel | {21EC2020-3AEA-1069-A2DD-08002B30309D} |
Printer | {2227A280-3AEA-1069-A2DE-08002B30309D} |
Recyle Bin | {645FF040-5081-101B-9F08-00AA002F954E} |
Network Neighborhood | {208D2C60-3AEA-1069-A2D7-08002B30309D} |
Dial-Up Networking | {992CFFA0-F557-101A-88EC-00DD010CCC48} |
My Computer | {20D04FE0-3AEA-1069-A2D8-08002B30309D} |
Desktop | {00021400-0000-0000-C000-000000000046} |
Shortcut | {00021401-0000-0000-C000-000000000046} |
Shell Favorite Folder | {1A9BA3A0-143A-11CF-8350-444553540000} |
The Internet | {3DC7A020-0ACD-11CF-A9BB-00AA004AE837} |
My Documents | {450d8fba-ad25-11d0-98a8-0800361b1103} |
Internet Cache Folder | {7BD29E00-76C1-11CF-9DD0-00A0C9034933} |
Internet Explorer | {871C5380-42A0-1069-A2EA-08002B30309D} |
Internet Explorer | {FBF23B42-E3F0-101B-8488-00AA003E56F8} |
ActiveX Cache Folder | {88C6C381-2E85-11D0-94DE-444553540000} |
Scheduled Tasks | {D6277990-4C6A-11CF-8D87-00AA0060F5BF} |
Subscription Folder | {F5175861-2688-11d0-9C5E-00AA00A45957} |
Url History Folder | {FF393560-C2A7-11CF-BFF4-444553540000} |
Briefcase | {85BBD920-42A0-1069-A2E4-08002B30309D} |
Inbox | {00020D76-0000-0000-C000-000000000046} |
IE5 | |
Web Folders | {BDEADF00-C265-11D0-BCED-00A0C90AB50F} |
Visual Studio 6 | |
Registered Active X | {6B19FEC2-A45B-11CF-9045-00A0C9039735} |
Developer Studio Components | {D545EBD1-BD92-11CF-8772-00A0C9039735 |
This topic is incomplete. Will be finished soon
[.ShellClassInfo] ConfirmFileOp=0 NoSharing IconFile=C:\WINDOWS\SYSTEM\shell32.dll IconIndex=41 InfoTip=An optional description for the folder that displays in a pop up tip and web view when selected HTMLInfoTipFile=file://Folder Settings\Comment.htt CLSID={CLSID} CLSID2={CLSID} UICLDID={CLSID} [ExtShellFolderViews] {5984FFE0-28D4-11CF-AE66-08002B2E1262}={5984FFE0-28D4-11CF-AE66-08002B2E1262} {8BEBB290-52D0-11d0-B7F4-00C04FD706EC}={8BEBB290-52D0-11d0-B7F4-00C04FD706EC} {BE098140-A513-11D0-A3A4-00C04FD706EC} [{5984FFE0-28D4-11CF-AE66-08002B2E1262}] PersistMoniker=file://Folder Settings\Folder.htt PersistMonikerPreview=%WebDir%\folder.bmp [{BE098140-A513-11D0-A3A4-00C04FD706EC}] Attributes=1 IconArea_Image=Folder Settings\Background.bmp IconArea_Text=0x00408000 IconArea_TextBackground=0x000000FF [{8BEBB290-52D0-11d0-B7F4-00C04FD706EC}] MenuName=T&humbnails ToolTipText=T&humbnails HelpText=Displays items using thumbnail view. Attributes=0x60000000