How do I associate the specified file type with my program?
3 answers
On OS X, update the contents of /Info.plist in the app bundle to preserve the CFBundleDocumentTypes array . Where you specify the extension (CFBundleTypeExtensions), document type name, custom icon, etc.
+1
source to share
You must change these registry entries (for Windows syntax, .REG):
[HKEY_CLASSES_ROOT\.txt]
@="textfile"
[HKEY_CLASSES_ROOT\textfile\shell\open\command]
@="C:\\WINDOWS\\NOTEPAD.EXE %1"
[HKEY_CLASSES_ROOT\textfile\shell\print\command]
@="C:\\WINDOWS\\NOTEPAD.EXE /p %1"
[HKEY_CLASSES_ROOT\textfile\DefaultIcon]
@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-152"
Of course you need to change programs to open and possibly an icon.
0
source to share