General discussion

Locked

Executing an EXE File in HTML

By chinmoy_b ·
I like to execute an EXE(*.exe) file from a HTML page. If I want to use Java Script to execute the EXE file from a HTML page, what's the code.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Executing an EXE File in HTML

by eBob In reply to Executing an EXE File in ...

Sorry, there is no JavaScript that will perform this.

You could try a simple link:

<a href="your.exe">Run This</a>

but I believe the functioning of this will depend to at least some extent on the setup of the user's Browser.

Collapse -

Executing an EXE File in HTML

by chinmoy_b In reply to Executing an EXE File in ...

The link <a href="your.exe">Run This</a> is OK. This link generally starts to download the EXE file. But I want to execute the EXE file. What's the simple solution.

Collapse -

Executing an EXE File in HTML

by eBob In reply to Executing an EXE File in ...

Since the behaviour of a simple link (as in my previous response) is browser dependent, you need to look at providing a solution on the server, itself.

That is to say: there is no "simple" solution.

But a quick little CGI (written in Perl, forexample) that calls the executable would definitely work. You might also be able to reconfigure your server to run the executable. The details depend on what server you're using. Both of these also require that you have access to run executables from your website.

Collapse -

Executing an EXE File in HTML

by eBob In reply to Executing an EXE File in ...

Going back to your question: there is no Javascript to do what you want.

Collapse -

Executing an EXE File in HTML

by chinmoy_b In reply to Executing an EXE File in ...

The question was auto-closed by TechRepublic

Collapse -

Executing an EXE File in HTML

by pratibha.malhotra In reply to Executing an EXE File in ...

U can definatly execute an exe from java code...u can always embed java code in html...

Use exec() of java.lang.Runtime class to execute any exe namely notepad....
This method will execute the specified string command in a separate process...in case u want code ::

Runtime r = Runtime.getRuntime();
r.exec("Notepad");

Collapse -

Executing an EXE File in HTML

by pratibha.malhotra In reply to Executing an EXE File in ...

note ::
I had forgot to mention entire path in exec()
r.exec("C:\WINNT\Notepad");
(sssuming u r working on NT/2000)

pratibha malhotra

Collapse -

Executing an EXE File in HTML

by chinmoy_b In reply to Executing an EXE File in ...

The question was auto-closed by TechRepublic

Collapse -

Executing an EXE File in HTML

by chinmoy_b In reply to Executing an EXE File in ...

This question was auto closed due to inactivity

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums