Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install a Microsoft Edge extension without user interaction?

I'm currently working on a Microsoft Edge extension which will be deployed in an enterprise environment.

The Edge extension has been currently installed manually (and reloaded at each browser restart since it's from an unknown source).

For Internet Explorer extensions, the DLL can be registered on the system with RegAsm and a Registry tweak allows loading all add-ons (the IgnoreFrameApprovalCheck key, see this link) without any user prompt.

Is there a similar way of adding Edge extensions automatically to the browser with no user interaction?

Thank you!

like image 562
adrianmp Avatar asked Oct 18 '22 04:10

adrianmp


2 Answers

At least until now (7/29/2016), installation of extensions for Microsoft Edge must be initiated and completed by the user. However, this policy may change in the future release, I'm not sure.

All extensions for Microsoft Edge must be deployed from the Windows Store. The installation must be initiated and completed by the user, using only the user experience provided by Microsoft Edge and the Windows Store. Software may refer to the extension in the Windows Store, but may not change the experience of acquiring the extension, or otherwise apply undue influence or false pretenses to the user to make them install the extension.

like image 153
Haibara Ai Avatar answered Oct 21 '22 21:10

Haibara Ai


I think it's worth trying Add-AppxPackage. You will need:

  • Packed extension, signed with a certificate that all target machines will trust. Should be possible in enterprise environment.
  • .ps1 installation script file, signed as well.
  • Set-ExecutionPolicy changed to AllSigned option on all target machines.

Package should be signed because otherwise Add-AppxPackage would not work. Set-ExecutionPolicy is usually set to Restricted, and that will prevent ps1 files from running (and Add-AppxPackage is a PowerShell-only tool) — that's why you'll need to force AllSigned mode and sign your script. There's also Unrestricted mode, but it's totally not recommended.

Then you write a .ps1 script with something like

Add-AppxPackage Path\to\Your_extension.appx

And deploy on target machines with your method of choice. Here you can find some methods of invoking it silently.

Please note that users will probably need to enable newly installed extension manually.

like image 20
Anatoly Sazanov Avatar answered Oct 21 '22 22:10

Anatoly Sazanov