Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a program from a local webpage

I'm trying to use a webpage as an entry point for a kiosk. The HTML will be run in local, I need two things:

<a href="c:\Users\Admin\Documents">...

Which works like a charm

And..

<a href="c:\Program Files\Windows Live\Mail\wlmail.exe">...

(program just an example, all programs are the same)

Which works but.. it prompts to download the file then you are prompted to start it.. Is there any way to do this directly, like click and bam you opened notepad.exe? Maybe using a Java applet?

EDIT:

I know it can't be done remotely, I'm talking about local files. The file will be accessed as c:\myhtml.html And will open ONLY already installed files, nothing from the web.

like image 731
0plus1 Avatar asked Mar 24 '11 16:03

0plus1


People also ask

Can you run a program on a website?

Running a program directly from an HTTP URL is not possible in Windows... however, it is possible to run programs from a WebDAV server (which is still HTTP with some extensions) because Windows has a WebDAV "redirector" alongside the more commonly used SMB.


1 Answers

If i get your question right , the closest thing to get what you want would be using *.hta which is a HTML Application that runs outside the browser window just like a normal app.

<script type="text/javascript" language="javascript">
    function RunFile() {
    WshShell = new ActiveXObject("WScript.Shell");
    WshShell.Run("c:/windows/system32/notepad.exe", 1, false);
    }
</script>

Bit more info here: http://www.kunal-chowdhury.com/2010/09/how-to-execute-local-file-using-html.html

like image 87
oprimus001 Avatar answered Sep 25 '22 12:09

oprimus001