1

I have a web application that runs internally. I need to run an executable (command line application written in C#) from the browser by passing it 2 parameters.

Infrastructure:

  • Windows XP - 8
  • Internet Explorer 6+
  • C# (.Net 4.0)

The code the launches the executable:

var scanApp = new ActiveXObject("WScript.shell");
scanApp.run("C:\\Path\\To\\exe param1 param2", 1, true);

The above works on my local machine because I have the exe in a known location (on my desktop).

My question is, how best can I deploy this on a client machine through activex and then run the executable?

The workflow would be:

1. Go to webpage
2. Click link that attempts to launch exe
3. Activex 'installs/downloads' the exe to a known location if its not there already
4. Run the exe

TLDR

How to deploy an executable through ActiveX and then launch it whenever user clicks on a webpage button?

Ishikawa91
  • 404
  • 4
  • 15

1 Answers1

0

Is it necessary that the installation occur through ActiveX? If not and you can deploy a different way (Group Policy, ClickOnce, etc), you can register a protocol handler to accomplish your second goal (similar to how iTunes is registered as a handler for itunes:// links). Just make that part of the install script.

For more information on that topic, see here or here.

Community
  • 1
  • 1
mwilson
  • 1,255
  • 12
  • 17
  • To clarify, by install I really mean just put the exe somewhere on the client pc. The exe is strictly a command line utility that does some stuff on the client computer and then posts some data to a server. I would like to make it as easy to run from any client within the network. – Ishikawa91 Dec 05 '13 at 23:04