HTML application run external exe on chrome using native messaging - javascript

Is it possible to run an external exe (under windows) using native messaging from a HTML application (Javascript) ?
Note:
I have a npapi plugin that runs an exe installed in the client machine. now npapi is deprecated, so I need another way to run my external exe from my website.

You are asking if there is a way for an html page to launch an executable on the client's machine? No, that is not possible. It'd be a huge security hole if it were.
What are you trying to accomplish?

Related

Openl JNLP/web start app from browser

I have a browser with my application running on it and I have one JNLP application installed on my system.
So from browser how do we launch the installed JNLP application.
I know we cannot do it from JavaScript/jquery.
So is there any plugin/extension that will do my work.
Or
can I write some kind of plugin/extension for browser that will invoke my JNLP application.
If Yes how do i proceed?
If you want to run anything Natively, you need to use NPAPI. That allows you to run code outside the sandbox for your extensions.
http://code.google.com/chrome/extensions/npapi.html

Running a script command remotely using Python

I have a Python program that uses BeautifulSoup to extract some data from a website.
In Google Chrome, there is this option called the Developers Console; it is used to execute javascript commands live right on the webpage.
Is there a way, or a work-around-of-a-way to execute javascript commands remotely using Python? Like casting a webpage to an object and running a javascript command in the background (without launching a new Chrome window)?
You can use Native Messaging API to communicate between a shell script and the browser.
You can also launch Chrome or Chromium with --headless flag set. See also puppeteer.

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

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..
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

Chrome extension development - open folder

I am developing a chrome extension for company internal use, what i want to do is open folder in explorer (design folder at internal server) when someone add the project id in a textbox and click the button,
ex:
'Y:\design\' + siteNumber
Can i do it using javascript?
Thanks!
Nalinda
No, javascript doesn't have access to the local machine's files/folders.
Sort of. You would need to write a stand-alone application in a native language (like C++ or Java) that could execute the opening of the folder, then have the Chrome extension communicate with it through the NPAPI Plugin. You could keep it all in Javascript by creating a Node.js program that executes the open /path/to/folder command (or your OS's equivalent). Either way, that native program would have to be pre-installed on the user's machine. But this doesn't seem like it should be a problem if it is an internal project.

Do I need to rewrite my client library in Javascript?

For my IOS Application, the client interacts with the server through a fairly substantial client library in C. I am recreating the app on a website, and I was wondering if I needed to rewrite this library in javascript. Would it be possible to say, transfer the original static client library to the client through local storage and somehow execute it? Or to download it as a plugin (how would I do this)? This is just speculation. Any ideas for a possible solution would be very helpful. It needs to be client-side because it streams and decodes a video feed through tcp.
Thanks in advance
As you iOS application uses a library in C the only way (somewhat experimental) is to use Google Native Client which is a sandboxing technology for running a subset of Intel x86 or ARM native code safely from a web browser. But by now it is only available on Chrome.
Otherwise you have to write it in Javascript in order to be cross platform and run it from nearly every web browsers. Moreover you can modify our iOS application and make it hybrid, and then you can use the same Javascript library in your iOS application and in the client web browser.

Categories

Resources