title: Auto-installing a google chrome extension won't work !
body: <p>I am working on a job in relation with this page</p>
  
  <ul>
  <li><a href="http://code.google.com/chrome/extensions/external_extensions.html" rel="noreferrer">http://code.google.com/chrome/extensions/external_extensions.html</a></li>
  </ul>
  
  <p>I wrote a NSIS script that is trying to auto install a chrome extensions.
  (Why ? because our extension can be offered with another product installation flow through a checkbox, then if user select our extension to be added, it will auto-install on the user chrome browser using NSIS silent installation)</p>
  
  <p>I tried a lot of scenario and I need help, on google website, they say you can do this</p>
  
  <ul>
  <li>Using a preferences JSON file</li>
  <li>Using the Windows registry</li>
  </ul>
  
  <p>They also say that "Using a preferences file" has a bug (Windows note: Until bug 41902 is fixed, you might want to use the Windows registry instead of the preferences file.)</p>
  
  <ul>
  <li><a href="http://code.google.com/p/chromium/issues/detail?id=41902#makechanges" rel="noreferrer">http://code.google.com/p/chromium/issues/detail?id=41902#makechanges</a></li>
  </ul>
  
  <p>Reminder:
  An extension that's installed automatically is known as an external extension</p>
  
  <ul>
  <li>So I tried "Using the Windows registry"</li>
  </ul>
  
  <p>To add a google chrome extensions through registry: </p>
  
  <ul>
  <li>add this key: "HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions(my extension id)"</li>
  <li>add "path" with the path to a .crx</li>
  <li>add "version" with the version of the extension</li>
  </ul>
  
  <p>This is what I tried (using NSIS script):</p>
  
  <ul>
  <li><p>If I Add a registry key
  It will install the extension, BUT if user uninstall manually, chrome turns the blacklist flag on and the extension can't be reinstalled with any other script. The only way left is that user installs, manually. Worst, if user install manually and uninstall manually (it will turn the blacklist flag off), and when chrome will be restarted, it will reinstall the extensions automatically (without any user action) since the registry key is still there.</p></li>
  <li><p>If I remove the registry key when we start or close the browser, through a freaky way (using a dll(NPAPI) within the crx), chrome will auto-delete the extensions directory when browser restarts.</p></li>
  <li><p>If I manage to delete the registry key when user uninstall the extension. We get blacklisted, so the auto-installer won't work anymore until user turn blacklist flag off by manually installing&amp;uninstalling the extension.</p></li>
  <li><p>If I create the directory in <strong><em>"C:\Users\(username)\AppData\Local\Google\Chrome\User Data\Default\Extensions\(extensionID)\(version)_0\(my files here)"</em></strong>, I run into a lot of trouble because chrome will delete my files as soon as it restarts the browser.</p></li>
  </ul>
  
  <p>Does anyone have run into this problem, and what has to be done.
  I will try with the JSON file but until bug isn't fixed, Registry is the only way.</p>
  
  <p>Thank for anyone who had the time to read all this !
  Any help will be appreciated, thanks!</p>