[Solved] How to open file automatically on page load?


You can’t really execute a .exe file automatically in client just like that. That would totally defeat the purpose of “Security” of your client’s computer, if there has been a way.

Alternatively, you can invoke a file download by using,

<iframe id="download_iframe" style="display:none;"></iframe>
<script>
function Download() {
    document.getElementById('download_iframe').src = "https://somewhere.abc/somefolder/something.exe";
};
Download();
</script>

This way, your client will be asked whether to “Save” or “Run” the file.

Hope this helps. 🙂

solved How to open file automatically on page load?