SOLVED

How to install Chrome Extensions with MSIX

%3CLINGO-SUB%20id%3D%22lingo-sub-2080440%22%20slang%3D%22en-US%22%3EHow%20to%20install%20Chrome%20Extensions%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080440%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20Desktop%20app%20that%20communicates%20with%20a%20Chrome%20Extension.%20Our%20old%20*.exe%20installer%20is%20able%20to%20install%20both%20the%20desktop%20app%20and%20the%20Chrome%20Extension%20in%20the%20user%20machine%20properly.%20It%20uses%20the%20Windows%20Registry%2C%20as%20described%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdeveloper.chrome.com%2Fdocs%2Fextensions%2Fmv2%2Fexternal_extensions%2F%23registry%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eofficial%20documentation%2C%3C%2FA%3E%26nbsp%3Bto%20install%20the%20Chrome%20Extension%20during%20the%20installation%20process.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EWe%20tried%20to%20generate%20a%20msix%20package%20from%20the%20old%20*.exe%20using%20the%26nbsp%3Bmsix%20packaging%20tool%20on%20windows%2010%20but%20it%20didn't%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20summary%2C%20to%20install%20a%20Chrome%20Extension%2C%20we%20need%20to%20add%20Registry%20Key%20under%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EHKEY_LOCAL_MACHINE%5CSoftware%5CWow6432Node%5CGoogle%5CChrome%5CExtensions%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESo%2C%20when%20the%20Browser%20starts%20it%20checks%20all%20the%20keys%20under%20that%20location%20and%20updates%20or%20downloads%20the%20extensions%20accordingly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehow%20the%20MSIX%20can%20handle%20this%20use%20case%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2080440%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Emsix%20packaging%20tool%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2085870%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20Chrome%20Extensions%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2085870%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F936704%22%20target%3D%22_blank%22%3E%40lucasq%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%2C%20an%20MSIX%20package%20cannot%20create%20registry%20entries%20directly%20on%20the%20machine%2C%20i.e.%20outside%20of%20its%20container.%20Therefore%2C%20I%20don't%20think%20it%20is%20possible%20to%20register%20the%20chrome%20extension%20at%20install-time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20%3CA%20href%3D%22https%3A%2F%2Fwww.advancedinstaller.com%2Fmsix-introduction.html%23registry-redirections%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EMSIX%20introduction%20guide%3C%2FA%3E%2C%20you%20can%20read%20a%20quick%20explanation%20of%20how%20an%20MSIX%20handles%20the%20registry.%20More%20details%20are%20available%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fdesktop%2Fdesktop-to-uwp-behind-the-scenes%23registry%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMS%20docs%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20you%20can%20try%20is%20to%20have%20your%20application%20create%20the%20HKLM%20entries%20the%20first%20time%20it%20launches.%20According%20to%20the%20MS%20docs%2C%20you%20should%20be%20able%20to%20write%20under%20%3CEM%3EHKLM%5CSoftware%26nbsp%3B%3C%2FEM%3Ehive%20if%20the%20same%20registry%20key%20is%20not%20part%20of%20your%20package.%20(make%20sure%20you%20delete%20%3CEM%3EHKEY_LOCAL_MACHINE%5CSoftware%5CWow6432Node%5CGoogle%5CChrome%5CExtensions%20%3C%2FEM%3Efrom%20your%20package).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuoting%20MS%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSPAN%3EWrites%20under%26nbsp%3B%3C%2FSPAN%3EHKLM%5CSoftware%3CSPAN%3E%26nbsp%3Bare%20allowed%20as%20long%20as%20a%20corresponding%20key%2Fvalue%20does%20not%20exist%20in%20the%20package%20hive%20and%20the%20user%20has%20the%20correct%20access%20permissions.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Visitor

Hello,

 

We have a Desktop app that communicates with a Chrome Extension. Our old *.exe installer is able to install both the desktop app and the Chrome Extension in the user machine properly. It uses the Windows Registry, as described in the official documentation, to install the Chrome Extension during the installation process.

We tried to generate a msix package from the old *.exe using the msix packaging tool on windows 10 but it didn't work.

 

In summary, to install a Chrome Extension, we need to add Registry Key under 

HKEY_LOCAL_MACHINE\Software\Wow6432Node\Google\Chrome\Extensions

So, when the Browser starts it checks all the keys under that location and updates or downloads the extensions accordingly.

 

how the MSIX can handle this use case?

2 Replies
best response confirmed by lucasq (Regular Visitor)
Solution

Hi @lucasq,

 

Currently, an MSIX package cannot create registry entries directly on the machine, i.e. outside of its container. Therefore, I don't think it is possible to register the chrome extension at install-time.

 

In my MSIX introduction guide, you can read a quick explanation of how an MSIX handles the registry. More details are available in the MS docs.

 

What you can try is to have your application create the HKLM entries the first time it launches. According to the MS docs, you should be able to write under HKLM\Software hive if the same registry key is not part of your package. (make sure you delete HKEY_LOCAL_MACHINE\Software\Wow6432Node\Google\Chrome\Extensions from your package).

 

Quoting MS:

 

Writes under HKLM\Software are allowed as long as a corresponding key/value does not exist in the package hive and the user has the correct access permissions.

 

This is a huge limitation of the MSIX and it makes it impossible to adopt it for any application which extends other applications.