Link to *.exe download

Asked

Viewed 809 times

1

I need to download a file *.exe via link on tag href, I did it this way:

<a href="remoto.exe"><input type="button" id="botao" title="Suporte HSS" value="Suporte HSS"></a><br><br><br>

But always download the error. If I change to download an image the link works normally. It is necessary some change to download file *.exe?

  • remoto.exe is a file on another server? or the same path as your html?

  • @Renan Is in the same Path

  • Okay, and what’s the mistake?

3 answers

2

If the mistake is something like:

Interrupted

or

Failed

or

network failure

There’s no way to fix it in HTML, use attribute download HTML5 will not make it work, .exe usually already lowers directly, this attribute has nothing to do with the problem.

It is likely to be some configuration on your server, there is no way to analyze, only with a tool like Wireshark or maybe analyzing Apache settings.

But it’s more likely to be something on your computer, like an antivirus that blocks, the extension .exe, use antivirus on the company’s computer, it always blocks the .exe.

I went through a similar situation, created a patch for employees to be able to install the software update themselves, they downloaded .exe, however it did not work, I went to check and it was the same error (probably) as your

So to be sure try to disable:

  • Antivirus
  • windowsdefender

And try to download again, probably will work, however this is not a good way and not a solution, after all are not all computers you will be able to do this at the time of download.

The ideal would be to change the extension to something like .zip, this made the download no longer interrupted.

1

Puts the attribute download on the tag <a>.

  • I tried to put the attribute download

  • you are trying in which browser?

  • I tried on Chrome, Mozilla and IE

  • 1

    Answer, answer yes. The problem is that the question is misspelled and does not explain what the "error" is. As the question currently stands, this answer is fully valid.

1

You should add an attribute download on your tag

https://www.w3schools.com/tags/att_a_download.asp

<a href="/images/myw3schoolsimage.jpg" download>
  Download
</a>

Another thing that caught my attention is that you are adding link in an input type="button", which doesn’t seem right.

If it doesn’t work You can add a small form to generate the download button

<form method="get" action="SEUAQUIVO.exe"> 
  <button type="submit">Download!</button>
</form> 

  • I tried to put the attribute download

  • The idea of the Button is for the user to click the Download button

  • Use css to format this button, not actually an input type button

  • Another way is you create a form for the download. I edited the response added this suggestion

Browser other questions tagged

You are not signed in. Login or sign up in order to post.