Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploying settings #28

Closed
jjurkus opened this issue Jul 16, 2020 · 9 comments
Closed

deploying settings #28

jjurkus opened this issue Jul 16, 2020 · 9 comments
Labels
information Provides information that may be useful later on

Comments

@jjurkus
Copy link

jjurkus commented Jul 16, 2020

I'm in the process of deploying chromium. I would like to deploy a few settings for all users. With another extension (uBlock) this is documented. I have this working with chromium and this extension.

Is there a way to set some settings for chromium-web-store? I would like to disable automatic updates, and ignore an extension.
At the moment I have a registry setting that installs this extension from a local file. Maybe this only works for a new profile, but this does not matter to me. I have tried using update_url, but couldn't get it to work. So now version 1.0.2 is installed from local, a newer version is available, but updating this does not work.

Some context:
working (with 32-bit redirection, so there is some SYSWOW64 stuff in there!):

[HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extensions\ocaahdebbfolfmndjeplogmgcagdmblk]
"path" = "c:\program files\Chromium extensions\Chromium.Web.Store.crx"
"version" = "1.0.2"

not working (this also does not work for uBlock, which uses the standard update_url):

[HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extensions\ocaahdebbfolfmndjeplogmgcagdmblk]
"version" = "1.0.2"
"update_url" = "https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates.xml"

For uBlock I can set settings like this (don't copy this as a reg file, this is from the script I work with):

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium\3rdparty\extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy]
"adminSettings" = '{"userFilters":"! Disable Strict blocking\nno-strict-blocking: * true\n\n"}'

This last thing works.

Now is there something like that possible/available for chromium-web-store which sets the options of the extension itself?

@jjurkus
Copy link
Author

jjurkus commented Jul 16, 2020

Some more info:
Using these builds: https://github.com/macchrome/winchrome/releases
Windows 10 64-bit

@NeverDecaf
Copy link
Owner

Regarding automatic installation for deployment, you should be able to use the ExtensionInstallForcelist policy. I was able to automatically install chromium-web-store alongside Chrome using this .reg file:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\ExtensionInstallForcelist]
"1"="ocaahdebbfolfmndjeplogmgcagdmblk;https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates.xml"

A couple caveats (that can most likely be avoided, I just don't know how):

  1. This only worked if the key was added before installing Chrome.
  2. The extension version was set to 1.0.0 for some reason, not sure if this is an artifact of using a non-google update URL or simply a mistake I am making.

Automatically setting options is a different matter. Currently you can either edit the LevelDB file used to store extension data or edit the extension source code (if installing from file), neither of which are ideal. I will work on implementing something similar to uBlock's solution.

@NeverDecaf
Copy link
Owner

I added policy management for chromium-web-store options similar to µBlock, please give it a try with the latest crx and let me know if it works as expected. For your particular case you can set the policy using this .reg file:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium\3rdparty\extensions\ocaahdebbfolfmndjeplogmgcagdmblk\policy]
"auto_update"=dword:0
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium\3rdparty\extensions\ocaahdebbfolfmndjeplogmgcagdmblk\policy\ignored_extensions]
"1"="<appid for ignored extension here>"
"2"="<2nd appid if you wish to ignore another>"

Note that these policy settings will override any settings the user attempts to change; in this case meaning the user will never be able to enable auto-updates or un-ignore the extensions you specify. Other options you do not modify can be changed by the user.

@jjurkus
Copy link
Author

jjurkus commented Jul 17, 2020

Wow, I must say I'm amazed at your speed. Thank you so very much!

I added policy management for chromium-web-store options similar to µBlock, please give it a try with the latest
crx
and let me know if it
works as expected. For your particular case you can set the policy using this .reg file:

It works great.

@jjurkus
Copy link
Author

jjurkus commented Jul 17, 2020

Regarding automatic installation for deployment, you should be able to use the [ExtensionInstallForcelist]
(https://www.chromium.org/administrators/policy-list-3#ExtensionInstallForcelist) policy. I was able to automatically install
chromium-web-store alongside Chrome using this .reg file:

I have tried this, just yet. Before I tried the ExtensionSettings option. It doesn't work for me, and I think I know the reason.
On this page it says: "For Windows instances that are not joined to a Microsoft® Active Directory® domain, forced installation is limited to apps and extensions listed in the Chrome Web Store."
I don't run a domain. Of course it also doesn't work for uBlock in my case, because chromium has no access to the chrome web store.

This turns into a nice little caveat: can't use the ExtensionInstallForcelist setting before chromium-web-store has been installed. Can't use it after chromium-web-store has been installed either, because the profile then exists, and chromium ignores this policy setting then. (Of course, why it doesn't work for existing profiles seems like a bit dumb to me.)

If however your computer also isn't joined to a domain, I would like to know.

Thanks again!

@NeverDecaf
Copy link
Owner

As far as I know my computer is not a member of a domain. I also tried reinstalling Chrome and this time the extension was not automatically installed (checking chrome://policy shows it was [BLOCKED]). This is in line with what you experienced and is probably caused by a leftover profile or registry keys from the uninstall. Google has a history of really not wanting users to install or use extensions from outside the Chrome Web Store so I wouldn't be surprised if there is no way to accomplish this besides your existing solution (install from local file) as long as you are on Windows.

@jjurkus
Copy link
Author

jjurkus commented Jul 20, 2020

Yeah, I should move away from windows :)

Thanks, I'll close this issue.

@jjurkus
Copy link
Author

jjurkus commented Jul 20, 2020

or I can't close it myself?

@NeverDecaf
Copy link
Owner

I believe you can, but I'm not very familiar with GitHub myself.

@NeverDecaf NeverDecaf added the information Provides information that may be useful later on label Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information Provides information that may be useful later on
Projects
None yet
Development

No branches or pull requests

2 participants