No, you cannot do that with Codeigniter.
Generally speaking, with server-side technologies like PHP, you can only send content to the client, not directly interact with the client. It is up to the client to do what they wish with whatever piece of content you send them. Even with client side tools like javascript, (thankfully) you can only have limited interaction with the client machine. What you are wanting to do is allow a website to (automatically) upon visiting, download a piece of software, and execute it on the client machine...
that's called malware... (brought to you by the makers of ActiveX)
Above was in direct response to
"...so that the browser may or may not download the file, depending on whether there is an application registered for that MIME type on the client machine (if there is one, that application will open that file).
UPDATE
You can set the mime type through plain php header manipulation. The following example is taken directly from the php header()
documentation as the first example.
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>