In general, you can't use JavaScript to tell the user's device to open an application (or run any other arbitrary operating system command).
Why?
- It's a massive security hole - what if you told it to execute a
malicious script, or to delete all the files on disk?
- You can't assume that the user's device actually has the program in question available.
- You can't assume what operating system the device runs, so you have no way to know exactly how to issue the command anyway.
Point 3 doesn't apply so much to your IE-specific idea, but that's the principle being applied. You'll also find that ActiveX (which you're using to work around point 1) is disabled or blocked in many installations, and will at the very least require the user to confirm that they wish to allow its use on your page, assuming they have the privileges to enable it at all. You would then also have to specify the correct path to the executable, which may differ on different machines.