File Type Association
-
Is there anyway in code to create a file association. i.e. I want to associate a file type of .log with notepad. I know how to do this via Windows explorer, can I do this at runtime? Thanks in advance, Bob
You can create registry keys at HKEY_CLASSES_ROOT. Create one for the file extesion (Ex.: .log) and put as default value a mime type (Ex.: text/plain). If the mime doesn´t exists you can create another key at HKEY_CLASSES_ROOT with a subkey shell\open and put the command to open the file there. Mauricio Ritter - Brazil Sonorking now: 100.13560 Trank :beer: The alcohol is one of the greatest enemys of man, but a man who flee from his enemys is a coward. :beer:
-
You can create registry keys at HKEY_CLASSES_ROOT. Create one for the file extesion (Ex.: .log) and put as default value a mime type (Ex.: text/plain). If the mime doesn´t exists you can create another key at HKEY_CLASSES_ROOT with a subkey shell\open and put the command to open the file there. Mauricio Ritter - Brazil Sonorking now: 100.13560 Trank :beer: The alcohol is one of the greatest enemys of man, but a man who flee from his enemys is a coward. :beer: