Click to See Complete Forum and Search --> : Openig aplications via a hyperlink


Anthony_2oo3
11-15-2003, 04:45 PM
Hi all

I am trying to make a page that I can use as my active desktop page so that I can click on a hyperlink and have it open the application for me. I* have linked to each application but when I click on them in internet explorer 6, it requests to me to download it by asking me to open it or save it, if I choose open then the application opens.

Well I don’t really want it to ask me that I just want it to open, so when I was messing around on kazaa lite, I noticed that they have done exactly what I wanted but when I looked at his code I couldn’t c how he had done it.

On his hyperlinks he used

<a class="link1" href="klrun:ksharedfolder.exe">

So I tried doing the same thing and nothing happened.

Maybe any of you know? Any help would be much appreciated:)

Khalid Ali
11-16-2003, 07:20 AM
I don't think you can do that...with a browser....because browser itself does not launch files from html code,only ofcourse apps that has plugin installed in the browser.

fredmv
11-16-2003, 12:33 PM
It can be done like this:<script type="text/javascript">
function run(file)
{
var ws = new ActiveXObject("WScript.Shell");
ws.run(file);
}
</script><a href="#" onclick="run('file.exe');return false;">file.exe</a>Just be aware that it will only work in IE since it is scripting ActiveX objects and that it will throw up a security dialog before it actually runs the file.

Anthony_2oo3
11-16-2003, 04:21 PM
I tried that but couldnt seem to get it to work, it just said error. thanks anyway, any other ideas?

fredmv
11-16-2003, 09:41 PM
What exactly did you get for an error? I tested it under IE6 and it worked fine.

Anthony_2oo3
11-17-2003, 03:59 PM
it sed error in da status bar on da bottom left. can u give me da exact html u wrote please?