Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a hyperlink to a local executable?

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

  1. How can we create a hyperlink on the intranet website that will launch the locally installed executable?
  2. 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:\Flipper\Splash.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.

like image 557
Scott Ferguson Avatar asked May 12 '10 03:05

Scott Ferguson


1 Answers

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!).

like image 132
Henning Avatar answered Sep 19 '22 14:09

Henning