Is it possible to load and unload unpacked Chrome extensions from the Command Line?
Yes, although only temporarily *:
chromium --load-extension=path/to/extension
If you want to load multiple extensions, just separate the path by a comma:
chromium --load-extension=path/to/extension,path/to/another/extension
Replace chromium
with chrome.exe
(or whatever is used to start your Chrome/Chromium browser).
* When you close the browser, and starts it again without the command line argument, then the extension will disappear from the list of installed extensions.
3 ways install/use Chrome extensions offline:
Method A: Drag & Drop (Simple)
Pros: Installs web & non-westore extensions
Cons: Google quickly & permanently disables non-webstore extensions
Method B: Load unzipped extension/7zip to unzip/ABP used as example
Pros: Permanently enables non-webstore extensions, so long as your using custom shortcut
Cons: Extensions only load via custom shortcut
~~~~~~~~~~~~~~~ 3 fixes for extracted extension errors: ~~~~~~~~~~~~~~~
Won't load: Create shortcut to folder containing manifest file, for example: akkmfdhlogbapbcgojknhfgppcionopk\5.4.7_0
Metadata: Extension\delete _metadata folder
Disabled: Open manifest.json with notepad & locate:
"name": "MSG_appName",
"offline_enabled": true,
Create: "offline_enabled": true, if it doesn't exist
Method C: WinRar SFX (Mass install local/non-local profile apps)
Chrome extracts all plugins to: %LocalAppData%\Google\User Data\Default\Extensions
Extensions list by web-store ID. Example: ABP=cfhdojbkjhnklbpkdaibdccddilifddb
ABP needs 3 files: Some extensions may only require 2
(ABP stores settings: %LocalAppData%\Google\User Data\Default\Local Extension Settings)
Pros: Mass install web & non-webstore apps, from local/nonlocal pc's
Cons: Google quickly & permanently disables non-webstore extensions
When SFX imports secure preferences file, it replaces old extensions/settings with imported
Restore Chrome Backup:
It is possible to install using --load-and-launch-app=path/to/app
it is working for both apps and extensions. (I tested on chrome Version 35.0.1916.153 m)
I am not sure that there is another command for uninstalling. I found this list of chromium commands which is very useful.
Try to kill all existing instances of Chrome from task manager : TASKKILL /IM chrome.exe /F
and then chrome.exe --load-extension=path/to/extension
should work
This working C# code for console application can help
class Program
{
static void Main(string[] args)
{
Process cmd = new Process();
cmd.StartInfo.FileName = "cmd.exe";
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.UseShellExecute = false;
cmd.Start();
//kill all chrome instances
cmd.StandardInput.WriteLine("TASKKILL /IM chrome.exe /F");
//path to chrome.exe
cmd.StandardInput.WriteLine("cd C:\\Program Files (x86)\\Google\\Chrome\\Application");
//load extension
cmd.StandardInput.WriteLine("chrome.exe --load-extension={path-to-extension}");
cmd.StandardInput.Flush();
cmd.StandardInput.Close();
Console.WriteLine(cmd.StandardOutput.ReadToEnd());
}
}