title: Chrome Extension Install via Command Line
body: <p>i made a zip file containing a google chrome extension pack and made it &quot;public&quot; via a download link (lets say its <a href="http://someaddress.com/extension.zip" rel="nofollow noreferrer">http://someaddress.com/extension.zip</a>).</p>
  <p>Then, i looked a lot on stackoverflow and found multiple approaches to add this extension as &quot;automatically&quot; as possible (without publishing it on the google store).</p>
  <p>I came up with this BATCH file:</p>
  <pre><code>@echo off
  
  setlocal
  cd /d %~dp0
  
  set dwURI=&quot;http://someaddress.com/extension.zip&quot;
  set tpZIP=&quot;%temp%\extension.zip&quot;
  
  call :DownloadFile %dwURI% %tpZIP%
  call :UnZipFile &quot;%AppData%&quot; %tpZIP%
  del &quot;%temp%\extension.zip&quot;
  
  taskkill /f /im &quot;chrome.exe&quot;
  start chrome --load-extension=&quot;%AppData%\extension&quot;
  start &quot;%AppData%\extension&quot;
  
  exit /b
  
  :UnZipFile &lt;ExtractTo&gt; &lt;newzipfile&gt;
  set vbs=&quot;%temp%\unzip.vbs&quot;
  if exist %vbs% del /f /q %vbs%
  &gt;%vbs% echo Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
  &gt;&gt;%vbs% echo If Not fso.FolderExists(%1) Then
  &gt;&gt;%vbs% echo fso.CreateFolder(%1)
  &gt;&gt;%vbs% echo End If
  &gt;&gt;%vbs% echo set objShell = CreateObject(&quot;Shell.Application&quot;)
  &gt;&gt;%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
  &gt;&gt;%vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip)
  &gt;&gt;%vbs% echo Set fso = Nothing
  &gt;&gt;%vbs% echo Set objShell = Nothing
  cscript //nologo %vbs%
  if exist %vbs% del /f /q %vbs%
  
  :DownloadFile &lt;URL&gt; &lt;DownloadTo&gt;
  bitsadmin /transfer mydownloadjob /download /priority FOREGROUND %1 %2
  cls
  </code></pre>
  <p>To actually &quot;install&quot; the extension the command ended up beeing this one line <code>start chrome --load-extension=&quot;%AppData%\extension&quot;</code> that sets the extension unpacked path to load.</p>
  <p>My problem: it only loads the extension on that particular call. If i close chrome and open it again it's not there, it doesn't &quot;auto load&quot;.
  If i go to the appdata folder and install the unpacked extension on google chrome enableing the developer option and seeking that folder it stays &quot;installed&quot;.</p>
  <p>Is there a &quot;--install-extension:&quot; command on google chrome that i cannot find, or is there another way to order it do install it?</p>