Monday, March 2, 2009

How to Change the Icon for a File Type in Windows 7 and Vista

Customizing the Icon for a File Type:
(For illustrative purposes, let’s assume that you have a custom file type .abc for which you want to change the icon.)
1. Click Start, type Regedit.exe and press ENTER
2. Navigate to the following branch:
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ FileExts \ .abc \ UserChoice
3. In the right-pane, note down the value data for Progid (e.g. abcfile). This is the user chosen (via Default Programs) Programmatic Identifier for the file extension

4. If the UserChoice branch does not exist, navigate to the following branch:
HKEY_CLASSES_ROOT \ .abc
5. In the right-pane, note down the (default) value data (e.g. abcfile). This is the Prog ID for the file extension.
6. Navigate to the following key (where abcfile is the Prog ID noted in Step 2 or Step 4 above):
HKEY_CLASSES_ROOT \ abcfile \ DefaultIcon
Note: If the DefaultIcon key does not exist by default, you need to create it manually.
7. In the right-pane, double-click (default) and mention the path to your custom icon (.ico file or reference to an icon resource from a EXE/DLL file).

For example, to set the 260th icon in Shell32.dll (contains a text pad icon), type the following path:
C:\Windows\System32\Shell32.dll,260

8. Exit the Registry Editor.
Restart Windows for the icon change to take effect. In case it doesn’t, you can force a icon refresh manually, or try rebuilding the icon cache
using Disk Cleanup.

No comments:

Post a Comment