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.