
All information about registry all stored in HKEY_CLASSES_ROOT tree item. It would be easier to have some example, so we want to associate file txt with notepad.
- We create item '.txt' if it doesn't already exist. Now we change default value to, let's say 'txtfile'
- We create item 'txtfile' and let's set default value to 'Notepad file - TXT'
- Now let's create subitem Default icon - default value must be in format 'drive:\path\to\file\name.extension, iconnumber' - 'c:\windows\notepad.exe,1'
- Next we have to set, which application will be used to open .txt file, so create 'shell' subitem (of txtfile), then subitem 'open' (of 'shell') and then 'command' subitem (of 'open'). In this item we have to set default value to 'drive:\path\to\file\name.extension' %1' - 'c:\windows\notepad.exe %1'.
If you want to see, how can you do it in CoolSetup, check file notepad.csp...