Monday, August 1, 2016

Associate custom mime type with a local application

When a file is downloaded in a browser, the browser asks whether to open the file directly (depending on browser settings). It is possible to define a custom mime type for our custom file extention (e.g. .xyz) and associate this custom mime type to a local exe program.

The steps have been listed below, though they might need some tweaks based on requirements.
[HKEY_CLASSES_ROOT\.atom]
    @="atom_file"

[HKEY_CLASSES_ROOT\atom_file]
    @="Atom Syndication Program"

[HKEY_CLASSES_ROOT\atom_file\shell]

[HKEY_CLASSES_ROOT\atom_file\shell\open]

[HKEY_CLASSES_ROOT\atom_file\shell\open\command]
    @="\"C:\\AtomHandler\\handle.exe\" %1"

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/atom+xml]
    "Extension"=".atom"
This is copied from the stack overflow post

http://stackoverflow.com/questions/6267546/how-do-i-associate-a-custom-mime-type-to-my-local-application-in-the-major-brows

No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...