Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Tutorials

Vista Tutorial - File Extension Type Icon - Change

Comment
 

File Extension Type Icon - Change

How to Change a File Extension Type Icon in Vista
Published by Brink
09-03-2008

How to Change a File Extension Type Icon in Vista
Information
  This will show you how to change the default icon for a file extension type of your choice to whatever icon you want it to be displayed as in Windows Explorer instead.
NOTE
  This will change all of the icons for that file extension type in Vista, not just the shortcuts of them.

To see what the file extension is for a file, see: How to Show and Change a File Name Extension in Vista


Some Common Icon Locations:
  • Unknown file icon - HKEY_CLASSES_ROOT\Unknown\DefaultIcon
  • Folder icon - HKEY_CLASSES_ROOT\Folder DefaultIcon
Tip
  You can also use the free configuration utilty program named Types to easily change a file extension icon to what you like in a easy to use window instead of through the registry.
WARNING
 
  • You will need to use a 256x256 pixel icon that was made for Vista for them to display properly at all of the available icon view sizes in Vista. For more about Vista icons, see: Icons in Windows Vista
  • Some programs will automatically reset the default file extension icon back to the one it uses even after you have changed it. This will not work for these.
  • If you change the default program for the file extension, it will also change the icon for it to whatever the program you selected as the new default uses.
RELATED LINKS:EXAMPLE: The Default .txt File Extension Type Icon
Name:  Default_TXT_Icon.jpg
Views: 20867
Size:  2.6 KB

Here's How:
NOTE
  For this tutorial, I am going to use just the file extensions .txt and .mp3 as an example. You can change any other files extension you like. Just substitute the file extension you want to change in the steps below instead.
1. Open the Start Menu.

2. In the white line (Start Search) area, type regedit and press Enter.

3. Click on Continue in the UAC prompt.

4. If Using the Default Program by Vista -
NOTE: You would use this option if you are using the default program that Vista uses to open the file extension.
A) In regedit, go to: (See screenshot below)
HKEY_CLASSES_ROOT\.txt
NOTE: Substitute .txt with the file extension you want to change instead.
reg1_file_extension.jpg
B) In the right pane of the file extension, look at the Data value to the right of (Default). (See screenshot above)
NOTE: For example it is txtfile for the .txt file extension type.

C) Go to step 6.
5. If You Changed the Default Program -
NOTE: You would do this option if you have changed the program used to open the file extension to a 3rd party program instead of the one Vista used by default.
A) In regedit, go to: (See screenshot below)
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mp3\Userchoice
NOTE: Substitute .mp3 with the file extension you want to change instead.
reg1_changed.jpg
B) In the right pane, look at the Data value to the right of Progid. (See screenshot above)
NOTE: For example it is WMP11.AssocFile.MP3 for the .mp3 file extension type by default. Your value will vary depending on the default program you have to open this file extension.
6. In regedit, scroll past the file extensions and go to: (See screenshots below 7)
HKEY_CLASSES_ROOT\txtfile
NOTE: Substitute txtfile with the Data value from step 4B or 5B for the file extension you want to change instead.

7. Click on the arrow next to txtfile to expand the key (folder).
NOTE: Substitute txtfile with the Data value from step 4B or 5B for the file extension you want to change instead.
reg2_from_file_extension.jpg
reg2_changed.jpg
8. To Backup the Default File Extension Type Icon Settings -
NOTE: To restore the default file extension type icon settings from this created backup below, right click on the .reg backup file and click on Merge. Next, approve the merge and log off and log on to apply the change.
A) Right click on DefaultIcon and click on Export. (See screenshot below step 9)

B) Select a location to where you want to save the backup (reg file) at. (See screenshot below)

C) Type in a name and click on the Save button.
NOTE: Be sure to type in a name that is easily recognized by you for that file extension.
9. In the right pane of DefaultIcon, right click on (Default) and click on Modify. (See screenshot below)
reg3_defaulticon.jpg
10. Select Option One or Option Two below for what icon you want to replace the file extension icon with.

OPTION ONE:
Change File Extension Type Icon to a Saved Icon
A. Download and save a icon of your choice to a location you wish to store this icon at.
NOTE: See the Warning box at the top of this tutorial for about what kind of icon to use. The icon must stay at this location for as long as it is being used for the file extension.

B. After step 9 above, type in the full path of the icon file location from step A and click on OK. (See screenshot below)
NOTE: For example, I used a icon file on my desktop. Sometimes you will need to add ,0 (number zero) at the end of the full path for it to work. For the example below, C:\Users\User-Name\Desktop\txt file.ico,0
Name:  Modify2.jpg
Views: 20925
Size:  31.9 KB
C. The registry will now look similar to this. (See screenshot below)
reg5_after.jpg
D. Go to step 11 below Option Two.
OPTION TWO:
Change File Extension Type Icon to another Vista Icon
A. Download and install the free program IconViewer.
NOTE: This program will add the Icons tab to files (ex: imageres.dll) that contain a icon library in them so you can see the icons available in it.

B. In Windows Explorer, navigate to C:\Windows\System32\imageres.dll and right click on imageres.dll and click on Properties.

C. Scroll through the icons and make note of the icon number of the one you want to use to replace the file extension icon with. (See screenshot below)
properties.jpg
D. After you had made note of the icon number, close the Properties window and the Windows Explorer window.

E. After step 9 above, change the number after - at the end to the icon number in step C and click on OK. (See screenshot below)
NOTE: For example, I wanted to change the icon for the .txt file extension to be icon number 19 from step C instead. If you do not have %SystemRoot%\system 32\imageres.dll,-### in Modify, then change it to this with the number (ex: 19).
Name:  Modify1.jpg
Views: 20544
Size:  32.1 KB
F. The registry will now look similar to this. (See screenshot below)
reg4_after.jpg
G. Continue to step 11 below.
11. Close Regedit.

12. Log off and log on, or restart the computer, to apply the changes.
NOTE: For the .txt file extension example, the left screenshot below is for after Option One, and the right screenshot is for after Option Two.
Name:  After2.jpg
Views: 20455
Size:  3.6 KBName:  After1.jpg
Views: 20420
Size:  2.8 KB
That's it,
Shawn

Published by
Brink's Avatar
Administrator

Join Date: Apr 2007
Location: Texas, USA
Posts: 25,806
Rep Power: 150
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute

Tutorial Tools

Applies to
All Vista Versions
64 Bit & 32 Bit

Old 09-09-2008  
ghufran
Newbie


Join Date: Aug 2008
Vista Ultimate x64
 
 

Re: File Extension Type Icon - Change

hi i need help

My System SpecsSystem Spec
Old 09-09-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

Re: File Extension Type Icon - Change

Hi Ghufran, and welcome to Vista Forums.

I'm sorry to hear that, but we cannot help you if you do not let us know what you need help with, and with as many related details about your problem that you think could be used to help you with.

Shawn
My System SpecsSystem Spec
Old 09-23-2008  
quackie
Newbie


Join Date: Sep 2008
Vista Home Premium 32bit SP1
 
 

Re: File Extension Type Icon - Change

Great job and thanks a million!

I've been looking for ways to change the icons without having to use Iconpackager or On Display and I finally found them here.

Cheers
My System SpecsSystem Spec
Old 09-23-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

Re: File Extension Type Icon - Change

Your welcome Quackie, and welcome to Vista Forums. I understand. I do not like using 3rd party programs for something that I can do within Vista if I'm able to either.

Shawn
My System SpecsSystem Spec
Old 09-24-2008  
quackie
Newbie


Join Date: Sep 2008
Vista Home Premium 32bit SP1
 
 

Re: File Extension Type Icon - Change

exactly my point.

just a quick question. say i got a file .hdmov. so i scroll to HKEY_CLASSES_ROOT\.hdmov and in there it tells me the value for (Default) is hdmov_auto_file.

however when i scrolled to hdmov_auto_file, there isn't any DefaultIcon folder when i expanded hdmov_auto_file. the only thing in it was just shell. any ways to work around this?

cheers

Click the image to open in full size.
My System SpecsSystem Spec
Old 09-24-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

Re: File Extension Type Icon - Change

I suppose as just a test, you could right click on hdmov_auto_file and click on New and Key. Type DefaultIcon and press Enter. Next add the icon path as described here to see if it works. If it doesn't, then you just right click on the DefaultIcon and click on Delete and Yes to approve.

Hope it works for you.
My System SpecsSystem Spec
Old 10-06-2008  
LordChen
Beast


Join Date: Oct 2008
Vista Ultimate x64 SP1
 
 

Re: File Extension Type Icon - Change

Good day,

I love your tutorials, Brink. They are all so useful but I have a question.
I'd like to change the 'unknown' file icon in vista, like either when a file has no extension or when it is not assosiated with any program.

Help would be most appreciated
My System SpecsSystem Spec
Old 10-06-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

Re: File Extension Type Icon - Change

Hi LordChen, and welcome to Vista Forums.

You would go to the the folder key Unknown in step 6 to change it's icon.

Hope this helps,
Shawn
My System SpecsSystem Spec
Old 10-07-2008  
iforall
Newbie


Join Date: Oct 2008
Vista Home Premium 32bit
 
 

Re: File Extension Type Icon - Change

I am trying to change the default icon for .css files. I want the icon that dreamweaver uses, but want to open .css files with notepad++. Setting the file association to notepad++ changes the icon, so I can't get the right one.

I tried using DefaultIcon and changing the Progid, but it still won't work.
My System SpecsSystem Spec
Comment

Tutorial Tools


Similar Threads
Tutorial Category
Unassociate File Extension Type General Discussion
script to change file type icon VB Script
How do you change a file type icon? Vista General
How do you change a file type icon? Vista installation & setup
Change file type icon Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
Tutorial powered by GARS 2.1.8m ©2005-2006

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46