How to use Google Chrome's "--disable-extension-except" command-line switch?

5,789

First, make sure you have the newest Chrome version; that switch is only implemented in Chrome 55 or higher.

Next, and confusingly, it takes a path to the folder containing an unpacked extension. Neither an extension ID nor a human-readable name will do it. You'll find your installed Chrome extensions here:

%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions

Inside each folder (named with an extension ID), there is a version folder that has all the interesting stuff. That's the folder path you need. For example, for me, the uBlock Origin extension is unpacked here:

C:\Users\Ben\AppData\Local\Google\Chrome\User Data\Default\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\1.10.0_0

Once you have that path, pass it to Chrome like this:

chrome --disable-extensions-except="C:\Users\Ben\AppData\Local\Google\Chrome\User Data\Default\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\1.10.0_0"

Replace chrome with the full path to the Chrome EXE, as you have. Note the = between the switch name and its value.

Alternatively, if you have an extension you're developing, you can just use the path to the folder that contains its manifest.json instead of poking around in Chrome's folders.

You'll get a warning when Chrome starts about running developer-mode extensions, but that's OK.

Share:
5,789

Related videos on Youtube

iTechnii
Author by

iTechnii

Updated on September 18, 2022

Comments

  • iTechnii
    iTechnii over 1 year

    I am trying to use the --disable-extensions-except switch in the target of a Chrome shortcut I've created in order to have just one particular extension running on startup for debugging purposes, but I am not quite sure how to use the switch effectively.

    I have tried:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-extensions-except "extensionsID"
    

    and:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-extensions-except "extensionsActualName"
    

    but to no avail. I have recently got into actual command-line coding so I am not too sure on all the attributes and such although I am willing to learn more. I know I am missing some syntax.