Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load and run an EXE file after a website loaded

Is there a way to load and run an EXE file on the client side, after a webpage has been loaded ? [with java script or HTML ]

like image 667
Mc.Lover Avatar asked Dec 01 '25 09:12

Mc.Lover


1 Answers

There (are||used to be) several JS interfaces for this, which are most likely blocked with modern browsers, for obvious security reasons.

So either your clients trust you and install you [FF/IE/Safari/etc.] extensions or ...

However, as for the FF extension way see my answer at this thread

in short:

External application launching according to this post can be done as follows:

var file = Components.classes["@mozilla.org/file/local;1"]
                     .createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("c:\\myapp.exe");
file.launch();

For IE you can try to run this

<script lang='vbscript'>
    set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "C:\program files\program\program.exe"
</script>
like image 177
Tzury Bar Yochay Avatar answered Dec 04 '25 01:12

Tzury Bar Yochay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!