I compile the extension using the --pack-extension
switch:
C:\Users\APOL0\AppData\Local\Google\Chrome\Application>chrome.exe --pack-extension="D:\MyExt"
Everything works fine: chrome generates Myext.crx
and Myext.pem
but I don't know how I can get extension ID for automatic installation using Windows' registry.
How can I get this ID without using "manual verification", ie. programatically?
Edit May 14, 2018: Added clarification and link to 3rd party tool.
There is no official supported method (at time of writing) to programmatically get the extension ID from a CRX without manually interacting with Chrome. (See official method below)
The only programmatic method I've found any reference to online is on this SO answer. The author of the answer later posted a link to a ChromeIdGenerator tool they wrote to accomplish this. The tool is based on how Chrome calculated its extension IDs at that point. Full disclosure: I have not tested the tool to ensure its accuracy, it is simply the only tool I've found to accomplish what you're asking.
If you open up your Chrome Extensions manager page, you can drag and drop your Myext.crx
onto the page (you must be in "Developer Mode") and it will load your extension, showing you the new extension id.
update June 30, 2023:
The Unofficial Method, is still working:
basically:
openssl pkey -in myext.pem -pubout > myext.pub
ex: 'f' => 15 => 108 => 'p'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With