google-chrome – I need to create an extension for Google Chrome that runs an .exe or something similar

Question:

I need to make my website run on a local system (your .exe), passing some attributes through the executable, I want to make an extension for Google Chrome so I can pass the parameters for it to run the program. How do I do that? If not, can you do something similar?

Answer:

This is not possible, there is no way around it as it is intentional that it is not possible (for security reasons) to be able to run an executable

What you can do is try to recreate your .exe as a WebExtension or as a ChromeApp, in the case of ChromeApp you can call it by the first extension using https://developer.chrome.com/extensions/runtime#method-connectNative

It was previously possible to use NPAPI to load dlls, but NPAPI has been removed.

Note however that it is possible to use NPAPI to load DLLs for example:

The manifest.json should look like this:

{
  "name": "My extension",
  ...
  "plugins": [
    { "path": "extension_plugin.dll" }
  ],
  ...
}

The usage should look something like:

<embed type="application/x-my-extension" id="pluginId">
<script>
  var plugin = document.getElementById("pluginId");
  var result = plugin.myPluginMethod();  // call a method in your plugin
  console.log("my plugin returned: " + result);
</script>

Scroll to Top