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

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

问题描述

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



我读了教程

a>在Mozilla网站上。但是很不清楚。即使没有像 HKEY_LOCAL_MACHINE \SOFTWARE\Wow6432Node\Mozilla\Firefox\Extensions 这样的注册表。问题:如果扩展名 id = 12345678 并且名字是 myaddon 如何将我的扩展名添加到Windows注册表,以便Firefox重新启动时识别新插件。我的默认配置文件文件夹是 C:\Users\piumi.baby\AppData\\ \\ Roaming \Mozilla \Firefox\Profiles\d32m6v0j.default



在此先感谢您。我试了很多,但迄今为止失败。

解决方案

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



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


$ b firefox.exe -install -extension path_to_extension。当然,使用必须同意安装(这是根据我的情况)


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.

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 .

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

Thanks in advance. I tried lot but failed so far.

解决方案

Have you tried using the mozilla firefox command line statements?

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. Of course, the used had to agree with the installation (this was according to my scenario)

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

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