There are ways to do this, but this is a security risk, so you cannot do this without the express permission of the user. If in IE you can do it with activeX, if in another browser it is more complicated - you may need to install a special add-on or dll.
One simple option is to register your program as a handler for a specific type of URI. If you have ever seen itunes:// links on the Internet, if itunes is installed on your computer, which will launch itunes directly. For instance. here is an explanation of how itunes does it . This is actually an explanation of how to stop it, but you can use it to set up your own system to do the same.
Another place to do this is on the Google Chrome download page. If you have ever installed any google product on your (Windows) computer, Google also installs a DLL that allows it to execute any signed Google product by simply clicking on the link. Go to the google chrome download page and you can cancel javascript to see how they do it (in the end theres an initially compiled dll, although this allows them to do this), but installing this additional software makes it pretty seamless, albeit a bit disturbing.
So you can see that there are many methods.
source share