-5

I would like to run an .exe file from the browser I've tried using the iframe command and but can't seem to get this to work all I want is every time someone goes on to the intranet (not the internet) is this possible?

Ok I've been researching this for a while, I understand the implications of doing something like this.

The only reason why I want to do it like this is because I want some updates to run whenever someone goes on the homepage of the intranet such as java, flash etc... is there a possible way to do this with minimal user interaction?

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
user1990312
  • 23
  • 1
  • 1
  • 5
  • It's normally not possible to do this, unless you register a [custom URL protocol](https://stackoverflow.com/questions/80650/how-do-i-register-a-custom-url-protocol-in-windows) for the `.exe`. – Anderson Green May 05 '22 at 23:20

2 Answers2

3

There is no standard way of running executables. You can only execute .exe in IE through ActiveX. Doing it in IE

Javascript to execute the .exe when the webpage loads -

window.onload = function(){
  if (!document.all) {
  alert ("Available only with Internet Explorer.");
  return;
  }
  var ws = new ActiveXObject("WScript.Shell");
  ws.Exec("C:\\Program Files\\Adobe\\Photoshop 6.0\\Photoshp.exe");
}
svineet
  • 1,859
  • 1
  • 17
  • 28
  • Is there a way to do this through http:// but silently because with the update having to be clicked on it seems as though the users just download the dam thing and then leave it and I've tried pushing the updates over the network but since the last administrator was useless its seems to cause problems all over the network some printers may go offline and this is what's got me thinking like this if I can do it this way then at least it will just download it from say java or adobe and install it without the user seeing anything. – user1990312 Jan 18 '13 at 12:31
  • @user1990312, updated answer to execute on webpage load – svineet Jan 18 '13 at 12:41
  • Thanks Vineet, Is there anyway to change ws.Exec to something that will download the file to /temp/file.exe and then execute it? – user1990312 Jan 18 '13 at 13:03
  • I don't know. Make another question, maybe someone else knows it? And yes, please mark my answer as correct(if it is). – svineet Jan 18 '13 at 13:15
0

Change their shortcut to their browser (that is sure a lot easier than prepping a special image or pdf file or god knows what).

Point the users browser-shortcut to a script, that first runs your exe (and every command you want), then finally start the browser itself. Just (like) a batch-script.

You are administrator on that corporate network right? Should be easy to do then.
Ofcourse you could als push the updates you want on your network, then you wouldn't need such a solution at all!

Good luck!

GitaarLAB
  • 14,536
  • 11
  • 60
  • 80