Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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: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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
266 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...