-3

How to open an EXE file from a Client Machine through a Web Application using Chrome?

I am able to open the EXE through Internet Explorer since I am using ActiveX Objects to open the Exe file through client side scripting. But since chrome does not support ActiveX I am unable to open the EXE from chrome. Can somebody provide an alternate way to open the exe from chrome?

I know it works if IETab addon is added to the browser for supporting ActiveX. But the client policy will not accept adding add-ons.

I am trying for a solution as such in WebEx websites where a temporary application is run once and each time it is accessed it opens in the temporary app without each time installing it.

Thanks in Advance..

willeezz
  • 1
  • 1
  • Possible duplicate of [Start an external application from a Google Chrome Extension](https://stackoverflow.com/questions/2652094/start-an-external-application-from-a-google-chrome-extension) – riyaz-ali Oct 22 '17 at 06:27
  • Not exactly. I am not talking about chrome extensions. I hope it is not clear. In fact I have a page in my web application for performing document scan. From that page I need to open the scanner application exe installed locally on a button click. This works fine in Internet Explorer with the help of ActiveX Object in Javascript. I need to perform the same in chrome also. But ActiveX cannot be used in chrome. Hence I am searching for alternatives. – willeezz Oct 22 '17 at 07:25
  • Does https://www.dynamsoft.com/blog/document-imaging/scanner-chrome-firefox-safari/ help? – mjwills Oct 22 '17 at 08:36

1 Answers1

0

Short and simple answer, NO! it's not possible just by using plain HTML5/JavaScript API, and thank god it's not possible or else the consequences would be devastating! Imagine any random website executing a file on your computer! That would be the worst security nightmare!

But, there are workarounds!
1. You can, for example, use Flash (but you shouldn't) or Silverlight but as mentioned the OP doesn't want any plugin-based solution so I guess they are not as useful.
2. Another solution would be to deploy a Desktop agent, if possible, and then communicate with it using a local Rest API and handle all the native access in that Desktop agent.

Still, the most preferred way would be to just ask your user to scan (or whatever) the document and upload it to your site.

More references can be found here

riyaz-ali
  • 8,677
  • 2
  • 22
  • 35
  • You can open an .exe from a web application by [registering a custom URL protocol](https://stackoverflow.com/questions/80650/how-do-i-register-a-custom-url-protocol-in-windows). – Anderson Green May 20 '22 at 02:00