Programatically Disable/Uninstall Chrome Extensions

2,642 views
Skip to first unread message

superloukmane

unread,
Jul 18, 2011, 1:01:01 PM7/18/11
to Chromium-extensions
Hi every one,

I'm building a C# application which comes with an Chrome extension.
I'd like to know if it's possible to disable/uninstall my extensions
via my Application. In fact, i'd like to know how to disable/uninstall
Chrome Extensions in C# or C/C++. :)

Thanks a lot! :)

Best Regards,

Loukmane

Boris Smus

unread,
Jul 18, 2011, 10:18:46 PM7/18/11
to superloukmane, Chromium-extensions
Hi,

You might be able to do this by manipulating your Chrome user data directory from your native application. For example, on mac, Extensions are stored in ~/Library/Application\ Support/Google/Chrome/Default/Extensions/extension_id.


Note that this is an unreliable method as there's no guarantee that chrome profiles will remain in the same format in the future.

- Boris


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


PAEz

unread,
Jul 20, 2011, 12:51:28 PM7/20/11
to Chromium-extensions
With the new profiles there can be more than one diretory (one for
each profile), you can find a list of the profiles and their user
names in the "Local State" file that you will find in the user data
directory.
In the profile directory youll find a "Preferences" file, this file
contains what extensions are installed and whether their enabled. The
state key of each extension object determines whether its enabled, its
0 if its disabled and 1 if it isnt.
Both the "Local State" and "Preferences" files are in JSON format.

On Jul 18, 7:18 pm, Boris Smus <s...@chromium.org> wrote:
> Hi,
>
> You might be able to do this by manipulating your Chrome user data directory
> from your native application. For example, on mac, Extensions are stored
> in ~/Library/Application\
> Support/Google/Chrome/Default/Extensions/extension_id.
>
> For other platforms, seehttp://www.chromium.org/user-experience/user-data-directory
>
> Note that this is an unreliable method as there's no guarantee that chrome
> profiles will remain in the same format in the future.
>
> - Boris
>
> On Mon, Jul 18, 2011 at 10:01 AM, superloukmane <loukmane.i...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi every one,
>
> > I'm building a C# application which comes with an Chrome extension.
> > I'd like to know if it's possible to disable/uninstall my extensions
> > via my Application. In fact, i'd like to know how to disable/uninstall
> > Chrome Extensions in C# or C/C++. :)
>
> > Thanks a lot! :)
>
> > Best Regards,
>
> > Loukmane
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org.

Levi Stanley

unread,
Oct 13, 2014, 8:39:13 AM10/13/14
to chromium-...@chromium.org
I am about 3 years later, however I am currently trying to do something similar.  However, the sync system seems to bring back the extensions I deleted.

Is there way to programmatically remove an extension, and also update the synced data?

Alex Shively

unread,
May 19, 2018, 10:44:08 AM5/19/18
to Chromium-Extensions-Announce
Almost 4 years later... you need to close Chrome and delete the Preferences file, it will be recreated when Chrome is opened again. Or, using a JSON parser you could find and remove the elements from the Preferences file. There are 3-4 key elements that need to be removed, you can search the file with the extensions ID and remove those keys/values.

prob...@chromium.org

unread,
May 22, 2018, 11:28:30 AM5/22/18
to Chromium-Extensions-Announce
Please don't programmatically delete the Preferences file. That's quite destructive.

The proper way to programmatically install and uninstall extensions can be found in this documentation.
For uninstalling the extension, see this section
Reply all
Reply to author
Forward
0 new messages