Javascript : Run client side EXE by CHROME [duplicate] - javascript

My requirement is to launch my installed application from chrome browser if it is installed on client machine, If not installed then I wanted to start download. What is best recommended solution for chrome?
So fare i tried following
used NPAPI, but due to deprecation of NPAPI by chrome I can't use.
Checked PNacl and Pepper API both API not providing access to local file system to launch an application. They just port my C/C++ code in browser and run it in browser environment with sandbox restrictions.
Is it true only option i have is to use native messaging? Or is there any other option for simple task to launch my application from our url,
Regarding “Native Messaging”
Do users need to install my extension
Do i need to add my extension to chrome store
How to deal with Registry permissions for non admin users
Can i install extension to chrome along with my app installation
Note :- Found some providers use “External Protocol Request” to launch application but there are no enough resources where can i found more about this
Thanks and Regards,
Pravin

For what its worth,
see here - http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/nativeMessaging/
the README indicates that Native Messaging can now be added even by non-Admins.
But it appears Native Messaging will only work for Extensions: "Extensions can exchange messages with native applications(...)" and I dont imagine you can expect all of your users to do that.

To open it if it's installed you just need to register your application (at the OS level, so the details will vary by OS; you don't say what OS you are targeting) as a handler for some specific scheme, then have your page open that scheme. That's the same flow that causes mailto: links to open a user's mail client, for instance.

If you have a chrome app, you can use inline install: https://developer.chrome.com/webstore/inline_installation

Related

How enable google chrome browser to run local commands in Windows?

I am using a web development tool called Oracle APEX 21.1 to create an app which will run on the web for some users and as desktop app for other users. The application runs in a browser in both cases. My problem is with the users that will use it as a desktop app. Sometimes I need to run a local file or run a specific program from the computer the user uses to run the app. The user is instructed to use google chrome to use the app. My question is, is there a setting of google chrome that I can set to allow my app to access local files or run Windows commands? Is there any other way i.e an add-on? If not, is there any other browser that can do the job? P.S: In my app, I can make use of JavaScript, JQuery, Oracle PL/SQL. Of course, a browser simple setting to set is the best option for me, if any.
in browser you you have to do use "href" string like this :
window.location = "notes:///server/file";
"notes:///" program name
And "server/file" parameter for programe

How To Run a Flutter Web Application Offline?

I got a problematic assignment from my employers.
I was given the task of developing simple software that will run strictly on Google Chrome,
without attempting to connect to the web (Security reasons).
I know flutter development and I feel comfortable with the sdk.
How should I develop a web app that can be deployed using a usb stick?
Looks like PWA can be an option, but the documentation is lacking in detail.
The system does not have the ability to run a local web server.
The Flutter app must be able to work with JS libraries, I intend to use jsQR.
service workers and indexedDB could help you for develop offline route app and offline api.
mdn docs for service workers
I'm not sure that this will fit your particular case: you say that the system can't run a local webserver, but what if you provide the webserver along with your software?
I just discovered get_server: you can find it here. It aims to allow developers to host their own HTTP server by using only flutter, without resorting to external tools or other coding/scripting languages. It allows also (and that's the relevant part) to wrap your flutter web app and make it run on local network.
For now I only tried with a very simple example, but it seems to be working. These are the steps I took:
create a new flutter project: since I needed the webserver to run on Windows, I had to get flutter ready for that (see here for help)
add get_server to the new pubspec.yaml
run flutter build web on your flutter web project, and copy the build/web output
folder in the root folder of the new project (I renamed the folder while copying since flutter might change the content of the web folder)
delete all the content of lib/main.dart
paste this (this the actual content of main.dart)
import 'package:get_server/get_server.dart' as gs;
void main() {
gs.runApp(
gs.GetServerApp(home: gs.FolderWidget('folderName')),
);
}
folderName is the name of the renamed folder containing the flutter web app build.
I ran this on Windows 'device' from AndroidStudio, and my original flutter web app was reachable at localhost:8080 (for now I just used the default options of get_server). I also got the webserver (empty) GUI as a white window: I guess that can be useful for some information regarding the server itself, although, if that windows closes, localhost:8080 becomes unavailable.
But, once released, you should be able to just run the executable from the USB stick, and then connect to it with Chrome.
PS: after some time using GetServer, I had to switch to other packages because of not-so-good docs and support. Now I'm using shelf, but also Alfred is a notable mention.

Launching a desktop application from a browser(client web page)

I need to launch an application which is installed in the client machine when the user clicks the link in the client webpage from browser. for instance like launching the Goto meeting application from the client machine when clicking the URL link if installed else providing the download link.
I tried with ActiveXobject approach which works only with IE browser.And also check with FileAPI.
In the following link they mentioned about using Asynchronous Pluggable Protocol Handler. Since I'm new to it. Can you please guide me where to start.
Launch application from a browser
About the environment. My server application is in Asp.Net MVC platform.
Thanks in advance
Since the browser prohibits you from executing anything locally I think the best way to solve your problem would be to create Chrome/Firefox extensions.
Extensions are not bound and can be executed locally.

upload chrome extension to store including native application

I have my first brand new google chrome extension, which I'd like to upload to the chrome web store. The thing is that my extension is using native messaging via stdio to a c++ exe. The extension also required a registry key to be installed.
Is it possible to upload the required files to the chrome web store (including exe and dll dependency)? Is there a way to automate the installation of the registry key (required to send messages from chrome extension js to exe), and register dll?
The idea behind chrome-extensions (and native messaging) is to limit the giant security hole that is NPAPI: to create a divide between the browser and the desktop that runs it. For this reason, you'll need to perform two separate installations: one for the extension and another for the native code.
To the best of my knowledge, you can't bundle the binary with the extension. But you might be able to (partially) do it the other way around: have the native code also install the extension:
There is a way to partially automate the process of installing the extension: you can pre-load the extension via the registry. This only applies to extensions on the chrome web-store (CWS). I believe this requires to reboot chrome. And of course the user is notified that an extension was installed. see here - https://developer.chrome.com/extensions/external_extensions
There's also something called "inline installation" - not quite "automatic", but this should make it easier for your users to install the extension from "within" your site (as opposed to the CWS). The extension still needs to be hosted on the CWS, but the user needs not navigate there.
see here - https://developer.chrome.com/webstore/inline_installation (and especially the line section - about verified site - which requires that you register your site with Google - and thus may render this technique useless to you)

Specifying Native Messaging Host for Chrome extension

I am using native messaging API in Chrome extension, and I want to ship the native application within my extension.
In Windows, I add a registry key under HKLM\SOFTWARE\Google\Chrome\NativeMessagingHosts. Since my application is inside the extension folder after installed, I reference the full path by "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\...\....json". But in this way, my extension complains "Specified native messaging host not found.".
If I expand the %LOCALAPPDATA% and write the path as "C:\Users\...\AppData\Local\Google\Chrome\User Data\Default\Extensions\...\....json", then my extension can successfully communicate with the host.
I wonder if this is an intended behavior? Thank you for your help.
There is no expansion of environment variables in the current Chromium code. It sounds like a reasonable feature request, though there might be security reasons not to do it. If you file a bug, we'll have a look and see whether it's feasible.

Categories