Question

I know this has been asked pretty much and I read them all but couldn't find anything relevant to my problem so asking again. I have made a simple chrome extension. Also packed it as crx using chrome. I want to install it programmatically using an nsis or C++ installer.

Got some help from here http://www.chromium.org/administrators/pre-installed-extensions

But I am not sure how can I get the ID of the extension that is used. As the ID for the same extension is different on chromes on different machine's, so one script wont work. Also registry method didn't worked for me.

So whats the trick ?

Was it helpful?

Solution

When you pack an extension, you also get a private key (in a .pem file). The extension ID is directly derived from this file (see also this answer).

After getting a private key and extension ID, you can lock the extension ID by populating the "key" field in the manifest file.

When designing an installer, keep in mind that Google is trying really hard to make it extremely difficult (if not impossible) for developers to install Chrome extensions that are not hosted in the Chrome Web store.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top