Download .EXE file via JQuery

How can I do a function, that allow do the download of a file in C: ?

For example, when the link is clicked, trigger a javascript function that will open the file or made download.

I'm trying this,

But it execute the program, I need that execute a download!

   if (url == "Supremo") {
       var oShell = new ActiveXObject("WScript.Shell");
       var prog = "C:\\inetpub\\wwwroot\\\\San\\up\\arquivos\\Supremo.exe";             '"' + prog + '"', 1);
       return false;



To get a user to download an exe file, you simply need to point them to the url with something like

window.location = '';

As per the comment below, simply make an anchor tag that points to the file:

<a href="">Download Executable</a>

Create a hidden iframe with a src attribute pointing to the file that needs to be downloaded. Keep in mind, however, that the src value needs to be a file that is accessible to the client, such as going to a domain.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.