# How can I change a file type's default program while keeping its current default icon on Windows 7

Let's say I want to open XML files in Notepad, I can change the default program through Control Panel > Programs > Default Programs > Associate a file type or protocol with a program.

However, that will also change its default icon to that of a text file. If I repeat the process for other file types then I lose the ability to easily distinguish different files in a folder based on their icon.

So after I change the default program, I would like to 'roll back' the icon change.

HKEY_CLASSES_ROOT\xmlfile\DefaultIcon stays the same as before the default program changed: %SystemRoot%\System32\msxml3.dll,0

I tried adding HKEY_CURRENT_USER\Software\Classes\xmlfile\DefaultIcon, as well as HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xml\DefaultIcon but neither seem to work.

What registry key(s) should I change to get back the old icon (%SystemRoot%\System32\msxml3.dll,0) but keep Notepad as the default program?

I downloaded FileTypesMan and it shows %SystemRoot%\System32\msxml3.dll,0 as the default icon for XML files, even though that is not the icon I see in Explorer, and even in FileTypesMan itself!

-
Filetypesman can do this....howtogeek.com/howto/12383/change-a-file-types-icon-in-windows-7 –  Moab Jun 1 '12 at 14:05
@Moab Thanks, though I had already edited my question: FileTypesMan reports a different icon than the one that is actually displayed in Explorer. –  michielvoo Jun 1 '12 at 19:33