12

I'm having trouble changing the icon for specific file types in Windows 8. I have read countless how tos including this question and this one, tried FileTypesMan and several other programs and edited the registry but none work exactly. After each method I have purged the icon cache and restarted just to be sure. I want to change the icons for .css and .js files (and others down the line) to separate icons, but both types open in Notepad++ by default.

Changing the DefaultIcon key in the registry for HKEY_CLASSES_ROOT\Applications\notepad++.exe (the ProgId associated with .js and .css in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.css\UserChoice) changes the icon for all files that open in Notepad++.

Changing the DefaultIcon for .css or .js files in HKEY_CLASSES_ROOT\CSSfile and HKEY_CLASSES_ROOT\JSFile has no effect.

Adding a DefaultIcon key to HKEY_CLASSES_ROOT\CSSfile did nothing either, and I was reluctant about experimenting by adding it elsewhere in case I broke something.

One thing I have noticed is, if I change the icon of an extension without a default program associated with it (.php in this case) then changing DefaultIcon in HKEY_CLASSES_ROOT\php_auto_file did work, but I stupidly chose to always open PHP files in Notepad++ after that and then it changed to the Notepad++ icon.

So is there a way of changing the icon for a file type that has a default program associated with it without changing all icons for files that open in the same program? Or is there a way of disassociating a file type with a program so that I can change the icon but always have to use "Open With..."? Preferably the former option.

2
  • I am looking fot this too.. Commented Aug 29, 2013 at 23:58
  • I guess a workaround would be to copy an application that can edit the file (I'm looking at you, notepad!) and change the default icon for the files edited with that program and do the same for each file extenstion. But this is REALLY time consuming as well space-consuming (though I can't figure out how to do this for notepad.
    – Roke
    Commented Oct 31, 2015 at 1:11

3 Answers 3

10

There is really simple program called Default Programs Editor available to download from here. It works good also for Windows 8.1 (not sure for Win 8).

Default Programs Editor

3
  • This app is a bit clunky but it works. You need to create a new file type for each extension that you want to change the icon for, and then assign an icon to that new file type.
    – Alan
    Commented Apr 9, 2014 at 15:45
  • 1
    This seems to do the trick! It would be nice to have some info on exactly how it does its thing on the back-end for those who wish to accomplish this manually. The info provided by Microsoft appears to be inaccurate, and doesn't work for many.
    – JimNim
    Commented Jun 9, 2014 at 15:06
  • seems to also work well on Windows 10...
    – Tim
    Commented Oct 11, 2015 at 11:58
2
+50

If what you really want is to edit the registry, you first need to make sure what Prog ID your file type is using. You can do so by navigating to:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.[ext]\UserChoice (where [ext] is the file extension you are looking for)

Then copy the value for Progid. If said value is not set there, then navigate to HKEY_CLASSES_ROOT\.[ext] and copy the value set for (default).

Next thing is to navigate to HKEY_CLASSES_ROOT\[progid]\DefaultIcon (where [progid] is the value you obtained earlier). If the DefaultIcon key is missing, you need to create it.

Finally, set the (default) value to whatever you want and restart explorer.exe with task manager. You can also log off and back in or restart, but this is the most efficient way.

Hope that helps.

2
  • 1
    Congratulations! This works! Check out my edit.
    – Roke
    Commented Nov 6, 2015 at 0:36
  • Thanks! And smart suggestion. I've been away from Windows for a while and completely forgot about the effects of killing explorer.exe. A lot better than restarting. :D Commented Nov 6, 2015 at 0:49
1

Changing the DefaultIcon for .css or .js files in HKEY_CLASSES_ROOT\CSSfile and HKEY_CLASSES_ROOT\JSFile has no effect.

Adding a DefaultIcon key to HKEY_CLASSES_ROOT\CSSfile did nothing either, and I was reluctant about experimenting by adding it elsewhere in case I broke something.

what you did here is changing the icon based on application icon assignment

So from my understanding, you are looking for a file-type icon assignment. You want the file name extension to dictate the icon assignment not the application itself even thought the name extension is associated with the same application

For your case (.js and .css extension)

  1. Navigate to HKEY_CLASSES_ROOT \ .js
  2. Create a new key (folder) under .js and name it as DefaultIcon
  3. In the newly created key, there is a default string value with value not set in its data. Double click this string value and add the icon path as its value (i.e X:\myiconfolder\customicon.ico)
  4. close registry and go into task manager. Under the process tab restart windows explorer process by right clicking on the process and choosing restart
  5. Do the same thing for .css file extension

Tell me whether this is working

2
  • I suggest trying it out before giving an answer to make sure it is correct.
    – Roke
    Commented Nov 1, 2015 at 13:08
  • This does not work.
    – Roke
    Commented Nov 1, 2015 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .