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

笑着哭i 提交于 2019-12-03 15:42:40

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.

Anatoly Sazanov

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!