I have been dealing with an issue for the last couple days and, despite the fact that long nights of read and debug didnt help, i wasnt able to resolve for myself, so im asking for a little help on this.
Its related to icon association files, and first of all i must apologize if my english is not perfect, but i will try to be clear.
Im currently using windows 2008r2, and i believe this is something related to windows Vista/7 core, which did not happend in previous versions like XP and such, those where more simpler in doing some stuff.
I have setup a specific icon for a file, by creating the corresponding entries on the registry.
[HKEY_CLASSES_ROOT\.ssa]
@="ssaFile"
[HKEY_CLASSES_ROOT\ssaFile\DefaultIcon]
@="C:\\Windows\\Icons\\IconLib2.dll,35"
This work pretty stright, and as far as i know that is the proper way to setup an icon for a specific filetype, which, lets assume, is not associated by any program.
As i said, the file is not suposed to be associated with any problem, or at least, that is not the important factor here, but here is when the troubles begin.
Whatever i double click the file, windows ask what i want to do, as the file is not registered, which is normal, and i select, for example, to open them with notepad, or any other program, everything works fine and the file gets opened, but then the icon get changed to that specific program document icon (you know, the white page with a small icon in the middle).
I had then look again at the registry, and the keys still there and where not modified, so there is no reference to the other icon.
The guess is clear, windows is getting the file icon somewhere else, and its taking precedence over the created registry values, the problem is how to stop that.
As far as i have searched, once i select a program to open the file Windows does create some keys in here.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
which have a reference for the opening program, but does not have any reference for the icon to display
i assume that is where windows is getting the icon from, but unfortunatly, i cannot seems to be able to delete that registry key, i got access denied (and yes, im Admin).
But besides, i assume that deleting that will just revert the situation, will givme me back my icon but will set the file to a non associated program.
So, basically, the questions is for the experts on there to know how to proper handle this situation, i need to be able to set a file icon that always takes precedence.
Anyone familiar with those issues?