How do I make a hyperlink to a local executable?

We have an Intranet website, and a WPF windows executable installed on every workstation.

  • How can we create a hyperlink on the intranet website that will launch the locally installed executable?
  • Ideally we want the launch to be seamless. Is there a way of setting the browsers trust settings so that it won't display a security warning dialog for this executable?
  • We have full admin capabilities on each workstation, and each user only uses Internet Explorer. We also know the correct local path for the exe.

    Update : We tried this anchor tag, but when we click on it, we get no response:

    <a href="c:FlipperSplash.Flipper.exe">Click Here</a>
    

    We have also tried this via Google Chrome, and we get the same (lack of) response. Clicking the link causes nothing to happen.


    If your users really use only IE you can use this snippet:

    <script type="text/javascript">
        function runNotepad() {
            var Shell = new ActiveXObject("WScript.Shell");
            Shell.Run("%WINDIR%notepad.exe");
        }
    </script>
    <a href="#" onclick="runNotepad(); return false;">Run Notepad</a>
    

    However, with any sensible security settings this leads to an awful lot of warnings (and rightfully so!).


    If you know the path for the file and it's the same on every machine, you can link to the local path:

    <a href="C:Windowsprog.exe">Click Here</a>
    

    We did this at a previous company on our intranet. Worked, no problem.


    I have links to UNC folders/files inside my intranet portal and I've found that the clients need to have the local domain name "mycompany.local" added in their "Trusted Sites". I have also found this only works in IE (verified not working in FireFox and Safari).

    链接地址: http://www.djcxy.com/p/45774.html

    上一篇: 已发布应用的证书丢失

    下一篇: 如何制作超级链接到本地​​可执行文件?