<a href="javascript:LaunchApp()">Click here to Execute your file</a>
The above code will call a user defined function call LaunchApp() which you can see in the following code snippets.
<script> function LaunchApp() { if (!document.all) { alert ("This ActiveXObject is only available for Internet Explorer"); return; } var ws = new ActiveXObject("WScript.Shell"); ws.Exec("D:\\Software\\youfile.exe"); } </script>
In the above JavaScript a LaunchApp() is
defined which will first check for the browser if your browser is not
internet explorer then it will show you message that your browser
doesn’t support the ActiveXObject and only available for InternetExplorer,If it is InternetExplorer then it will create object for WScript.Shell and will execute yourfile.exe in the D:\software location.