Search code examples
google-chrome-extensionregistrynpapi

writing to windows registry from chrome extension


Is there a way to write to/read from the registry in Windows using a Google Chrome extension?

I'm looking to do something analogous to the following firefox functionality: https://developer.mozilla.org/en-US/docs/Accessing_the_Windows_Registry_Using_XPCOM


Solution

  • Registry access is not exposed to extensions by Chrome, at least not to content or background scripts.

    You'll have to create a plugin to do that.

    (Untested) Idea:

    1. Write a scriptable plugin who can read and write registry entries and then expose those methods to javascript.
    2. Embed this plugin (object) on background page.
    3. Use this to read registry values.

    Anyway, unless I am wrong, you won't be allowed by the browser to write registry values.

    Firebreath is a framework to write NPAPI plugins: http://www.firebreath.org/

    God luck.