Saludos hermes, aki te pongo un codigo ke encontre hace tiempo, es largo, pero esta explicado. Espero ke te sirva, 
NOTA: Parece desordenado, pero simplemente copia y pega en word o notepad...
Register
the .fjf file extension
Create
a new instance of the Registry class (you
don't have to do it with pointers but I like
it better this way 
TRegistry*
thisReg = new TRegistry();
Set the root key to
HKEY_CLASSES_ROOT, which is where file associations
are stored
thisReg->RootKey
= HKEY_CLASSES_ROOT;
Open/Create the key
for the file extension you want to change/register
thisReg->OpenKey(".fjf",
true);
Set
the default value to the program you want
to associate the extension with NB: This can
be what ever you want. The name (here FormLoader)
is just a link to the next key we are going
to create
thisReg->WriteString("",
"FormLoader");
Close Key
thisReg->CloseKey();
Write
the default Open command (here we open/create
the key with the association name from above)
thisReg->OpenKey("FormLoader",
true);
Set
the desciption of the file association
thisReg->WriteString("",
"FormLoader Jobfile");
Create
Key "shell" and set "open"
as default command (which is actually the
FormLoader->shell key 
thisReg->OpenKey("shell",
true);
thisReg->WriteString("", "open");
Open
the "Open" key (which is actually
the FormLoader->shell->open key 
thisReg->OpenKey("open",
true);
Write
the text (which will be shown in the popup
menu for the object on the explorer)
thisReg->WriteString("",
"&Open");
Create
Key "command", which is what is
caried out if the user select "Open"
--- *
thisReg->OpenKey("command",
true);
Write
what should be done when "Open"
is choosen ParamStr(0) is the name and path
to my program %1 is the paramter to my program.
This means that my program will be started
with the object, on which we have choosen
"Open," as parameter.
thisReg->WriteString("",
ParamStr(0)+" \"\%1\"");
Close
Key
thisReg->CloseKey();
Write
Open batch command
Here
is shown how to create an extra command for
your extension.
thisReg->OpenKey("FormLoader",
true);
thisReg->OpenKey("shell", true);
thisReg->OpenKey("open batch",
true);
thisReg->WriteString("", "Open
&Batch");
thisReg->OpenKey("command", true);
thisReg->WriteString("", ParamStr(0)+"
-b \"\%1\"");
thisReg->CloseKey();
Set
default icon
This
is the icon that will be given each object/file
that has extension ".fjf"
thisReg->OpenKey("FormLoader",
true);
thisReg->OpenKey("DefaultIcon",
true);
Here
is set the icon to the 2 icon resource in
my programs exe file. To give the objects/files
the same icon as your own program just write
thisReg->WriteString("", ParamStr(0)+",0");
instead
thisReg->WriteString("",
ParamStr(0)+",1");
Clean
up
delete
thisReg;
Autor: Jeppe Cramon