Download the file type that you want, opened automatically from the browser. You should see it displayed in the downloads bar at the bottom of the page.
When it completes, click on the small arrow icon next to it and select the “always open files of this type” option.
This marks the file type so that it is run automatically whenever files matching it are downloaded to the local system.
For some file types, “always open with system viewer” is displayed instead; this is the case for PDF documents.
That’s all there is to it. All future files that you download that match the file extension will be run automatically on the system.
Note: Google Chrome prevents certain file types from opening automatically. The option to select “always open files of this type” is grayed out and not available for file types that Google considers dangerous. File types that won’t show the option include .exe, .zip, or .bat files. Basically, any file type that is popular when it comes to malware distribution is blocked in Chrome.