How to enable chrome extension without user intervention (programmatically) - google-chrome

I made a chrome extension and want its installation to be done as a part of software installation setup using windows registry. It installs the extension for chrome, but in disabled state. Extension is listed in the list of installed extension in chrome://extensions. How can I enable the extension using code(without end-user intervention). I don't want my user to enable it manually.

You can't directly enable chrome extension because of chrome security police(After Chrome 25).
Extensions installed by third party programs using external extension deployment options will be disabled by default. When a third party program installs an extension, the Chrome menu will be badged, and users can click through the Chrome menu to see a dialog containing an option to enable the extension or to remove it from their computer.
In addition, all extensions previously installed using external deployment options will be automatically disabled. Chrome will show a one-time prompt to allow the re-enabling of any of the extensions.
But you can use inline installation but you need to upload your extension in Chrome Web Store and ask to user directly like this.
For More information check below links :
No more silent extension installs
Protecting Windows users from malicious extensions

Related

Can i host google chrome extension on my own server?

I have created a small google chrome extension (just a simple html popup)
that itself is a part of desktop app. Now i want to give users ability to install
this extension, but i don't want to publish it to chrome store, as it is not standalone app but only small plugin, that will not work without desktop app installed.
I read here https://developer.chrome.com/extensions/hosting
that i can create .crx file and host in on my own server.
But in same time this page said: "Warning: As of Chrome 33, Windows users can only download extensions hosted in the Chrome Web store, except for installs via enterprise policy or developer mode "
So i am confusing, am i able to create .crx file, host it on my server, and allow windows users install it on their browsers?
Thanks.
Yes with the limitations stated in "Warning: As of Chrome 33, Windows users can only download extensions hosted in the Chrome Web store, except for installs via enterprise policy or developer mode "
Which means that the user cannot download it from any private sever and install it. It has to be installed trough the company GPO and the system need to be joined to an Active Directory domain (A/D).You can download an ADM or ADMX from
https://enterprise.google.com/chrome/chrome-browser

A custom extension is not listed in extensions page in some computers

I have developed a Google Extension for which I created a Windows installer package. That installer writes the corresponding registry entries as explained in https://developer.chrome.com/extensions/external_extensions#registry
All that works well in some computers. So, after I run the installer package and then run Google Chrome, a little popup appears telling me to enable the extension. I answer “Yes” to that question and from that time on, the extension works as expected.
However, in some computers, with the same version of Chrome (53.0.2785.116 m), the installer writes the corresponding entries to the registry but when I run Chrome, nothing happens and the extension is not listed in the chrome://extensions/ page.
In such cases, I can connect to web store to install the extension manually. However, this extension launches an application because it implements Native Messaging. When I install the extension manually it works (the native messaging host application is launched and works) but when I close and re-open Chrome, the host application is not run. To run it, I need to manually disable and then re-enable the extension.
Very strange what happening. Can you help me on this please?
Based from this thread, (which is somewhat related to your issue), when you close the Chrome, it will fire onDisconnect event that's why the application is not running.
Native messaging means only Chrome can start a host instance when it "connects". It's a misnomer, since connect() means "launch a new copy and talk to it".
There is no way to "attach" to an already-running process. If you close the host, stdio pipe is broken the Port object fires onDisconnect event. Then you need to re-launch the host from the extension to be able to talk to it.
You can check on this link. Just make sure that no antivirus or firewall programs on your computer are causing the problem. If you can open Google Chrome when the firewall is off, you may need to create an exception in your antivirus or firewall settings.
However, in some computers, with the same version of Chrome (53.0.2785.116 m), the installer writes the corresponding entries to the registry but when I run Chrome, nothing happens and the extension is not listed in the chrome://extensions/ page.
You may be encountering blacklisting if that extension was ever installed, then uninstalled.
What if the user uninstalls the extension?
If the user uninstalls the extension through the UI, it will no longer
be installed or updated on each startup. In other words, the external
extension is blacklisted.
How do I get off the blacklist?
If the user uninstalls your extension, you should respect that
decision. However, if you (the developer) accidentally uninstalled
your extension through the UI, you can remove the blacklist tag by
installing the extension normally through the UI, and then
uninstalling it.

install chrome extension outside the chrome extension market

As I know you can install an extension outside the market without expected limitations, for example, autoupdate. You need to be in develop mode.
You can read this thread to understand the problem:
Install chrome extension as external extensions
The think is, anyone know another way to install an extension in your chrome (internal use in a company o class). I like to think that I can sign the extension with a shared certificate or something like that. And send the extension to the users.
Google no longer allows it.
Protecting Chrome users from malicious extensions
Continuing to protect Chrome users from malicious extensions
There are 4 types of extension install still available:
Direct installation from Webstore or inline install from a website, but hosted on Web Store.
Indirect installation through registry manipulation (e.g. companion extension for a native app), but it still must be hosted in the Webstore.
Local development installs; will nag on every Chrome restart and no autoupdate mechanism.
For Enterprise only, policy-based installs. Note that on Windows that requires computers joined to a domain. In this case there are no restrictions on where the extension is hosted.

Installing External Extension

I want to create a Chrome extension and install it as part of a larger desktop software install. This is on Windows XP/Vista/7 etc. I've used the method described here and it works.
However, the extension is installed in a disabled state. The user has to explicitly enable it from the Chrome menu (the user has 3 chances to do that before the menu badge disappears) or from the extensions page. Enabling the extension brings up a prompt in which Chrome informs the user of the permissions the extension is requesting and asks the user to reject or accept the extension.
I understand that Google wants to ensure that users have a chance to reject external extensions. I also understand that Google prefers installs via its Web Store (for various logistical reasons, that is not a preferred option for this app). In fact, our application specifically asks the user for permission before installing the extension.
My issue is that the member has to affirmatively ask for the extension to be enabled before the permissions dialog comes up. Is there any programmatic/command line way to get Chrome to bring the permissions dialog up? The user still has the choice of rejecting the extension, but I would like to present the user with this choice, rather than relying on him/her to try and enable the extension later.
[ I realize that editing the Chrome Preferences file in the installation script will install the extension without any user intervention, but I don't want to do that.]
It's possible to trigger an install from a webpage. Have your installer open chrome with a small webpage that brings up this dialog to the user.

Auto enable chrome extension installation

I am using Chrome 25.0.1364.152 m and I develop a Chrome Extension. I wanna install it as an external extension and I succeed. The only problem is that I must enable this extension manually. That means I have to enable it every user profile. (I have lots of Chrome user profile on my machine) Is there any way to do this enable work automatically(via preference or something)?