以编程方式安装Firefox插件? [英] Install Firefox addon programmatically?

查看:76
本文介绍了以编程方式安装Firefox插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从桌面应用程序向浏览器安装Firefox插件.我正在使用C#.我将.xpi文件复制到默认配置文件的扩展文件夹中.但是,当我重新启动Firefox时,Firefox无法识别该插件.

I want to install a Firefox addon to the browser from desktop application. I'm using C#. I copied the .xpi file to extension folder of default profile. But Firefox does not recognize that addon when I restart Firefox.

我在Mozilla网站上阅读了教程.但这还不清楚.即使没有像HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Firefox\Extensions这样的注册表.我认为它已经过时了.

I read a tutorial on the Mozilla website. But it's very unclear. Even there is no registry like HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Firefox\Extensions. I think it's outdated .

问题:如果扩展名id=12345678和名称为myaddon,如何将扩展名添加到Windows注册表中,以便Firefox在重新启动时识别新的插件.我的默认配置文件文件夹为C:\Users\piumi.baby\AppData\Roaming\Mozilla\Firefox\Profiles\d32m6v0j.default

Question: if extension id=12345678 and name is myaddon how can I add my extension to windows registry so firefox will recognize new addon when restart .my default profile folder is C:\Users\piumi.baby\AppData\Roaming\Mozilla\Firefox\Profiles\d32m6v0j.default

推荐答案

您是否尝试过使用 mozilla firefox命令行语句?

让我知道是否有帮助. 我已经使用以下命令行选项成功启动了.XPI文件安装:

Let me know if that helped. I've successfully launched an .XPI file install using the following command line options:

firefox.exe -install -extension path_to_extension.当然,二手车必须同意安装(这是根据我的情况)

firefox.exe -install -extension path_to_extension. Of course, the used had to agree with the installation (this was according to my scenario)

这篇关于以编程方式安装Firefox插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆