Problem associating file extension with application

I am trying to associate a new extension with my application programatically writting in registry.
I have done the necessary steps to create all subkeys in the HKEY_Classes_Root:

HKEY_CLASSES_ROOT
.myp
(Default) = MyProgram.1
MyProgram.1
(Default) = MyProgram Application
Shell
(Default) = doit
open
command
(Default) = C:\MyDir\MyProgram.exe "%1"
DefaultIcon
(Default) = C:\MyDir\MyProgram.exe,0
The problem is that afters this installation the application icon is not associated with the files and not shown in Explorer.So I have added some more changes in HKEY_Current_User in registry :

"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & EXT & "\Application", FileName
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & EXT & "\OpenWithList\a", FileName

To be more clear my application is using the steps done in the code snippethere
But still my icon is not show in Explorer. If you have any idea why please let me know or if there is another code snippet as I am writting my code on C#.
Thanks in advance :)


[1611 byte] By [t_ivanov] at [2007-12-29]
# 1
Hi i am also looking for it. Please give me the code if you got such one.
GunaChinna at 2007-9-5 > top of Msdn Tech,Visual C#,Visual C# General...
# 2

Hi i am also looking for it. Please give me the code if you got such one.
GunaChinna at 2007-9-5 > top of Msdn Tech,Visual C#,Visual C# General...
# 3

strFilePath=@"C:\Guna\VS2005\AplnOpener\AplnOpener\bin\Debug\AplnOpener.exe";

regRootKey=Registry.ClassesRoot;

regRootKey = regRootKey.CreateSubKey(".guna");

regRootKey.SetValue("", "AplnOpener");

regRootKey.SetValue("Content Type",strFilePath);

//regSubKey =regRootKey.CreateSubKey("OpenWithList");

//regSubSubKey=regSubKey.CreateSubKey("AplnOpener.exe");

GunaChinna at 2007-9-5 > top of Msdn Tech,Visual C#,Visual C# General...