Reputation: 7830
We have an Intranet website, and a WPF windows executable installed on every workstation.
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.
Upvotes: 8
Views: 36938
Reputation: 11696
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!).
Upvotes: 3
Reputation: 72222
Use the file:/// prefix.
Like so:
<a href="file:///C:/Windows/notepad.exe">asd</a>
I'm not sure if you'll be able to get past the security dialog though (open, save, cancel).
Upvotes: 0
Reputation: 6532
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).
Upvotes: 0
Reputation: 8086
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:\Windows\prog.exe">Click Here</a>
We did this at a previous company on our intranet. Worked, no problem.
Upvotes: 0