.net 单击一次的 Google Chrome 扩展程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/502472/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google Chrome extension for Click Once?
提问by Dan
I have a client that wants to use Google Chrome for an internal web app we've developed(I don't blame him, I really enjoy using chrome!)
我有一个客户想要将 Google Chrome 用于我们开发的内部网络应用程序(我不怪他,我真的很喜欢使用 Chrome!)
The problem is we have a win forms app that the users can launch from the browser, deployed using click once. I've known for a while that chrome doesn't support click once, but I figured by now there might be some support out there.
问题是我们有一个 win 表单应用程序,用户可以从浏览器启动它,使用单击一次部署。我早就知道 chrome 不支持单击一次,但我认为现在可能会有一些支持。
I have spent a few minutes searching around stack overflow and Google and didn't find anything obvious that suggests if anyone is planning on it or has developed a click once extension for chrome(similar to FFClickOnce).
我花了几分钟搜索堆栈溢出和谷歌,并没有发现任何明显的迹象表明是否有人正在计划或已经为 chrome 开发了一次点击扩展(类似于 FFClickOnce)。
So, has anyone got click once working under chrome or has anyone seen any news of a plug-in/extension that will support click once?
那么,有没有人在 chrome 下工作过一次点击,或者有没有人看到任何支持点击一次的插件/扩展的消息?
采纳答案by Eric
Google Chrome doesn't really support extensions adding the .NET version to the user agent but for plain launching .applications give this a try:
谷歌浏览器并不真正支持将 .NET 版本添加到用户代理的扩展,但对于普通启动 .applications 试试这个:
https://chrome.google.com/extensions/detail/eeifaoomkminpbeebjdmdojbhmagnncl(No more available)
https://chrome.google.com/extensions/detail/eeifaoomkminpbeebjdmdojbhmagnncl(不再可用)
https://chrome.google.com/webstore/detail/clickonce-helper/mdooolbdbmjaobhdondofgdmnbidlgfh
https://chrome.google.com/webstore/detail/clickonce-helper/mdooolbdbmjaobhdondofgdmnbidlgfh
回答by James Jones
Chrome is not capable of auto-launching the setup.exe like Explorer does, but Chrome does download it like any other file. It's not difficult for the user to run it once it is downloaded until Chrome comes up with a way to cause it to automatically launch.
Chrome 无法像 Explorer 那样自动启动 setup.exe,但 Chrome 确实像任何其他文件一样下载它。用户下载后运行它并不困难,直到 Chrome 想出一种方法让它自动启动。
回答by TomZ
Install IETab for Chrome, then set up the rules to always open the launching page with IETab.
安装IETab for Chrome,然后设置规则以始终使用 IETab 打开启动页面。
回答by Brian
There is now an extension from Chrome that allows you to launch a click once app (ClickOnce for Chrome).
Chrome 现在有一个扩展程序,允许您启动一次点击应用程序(ClickOnce for Chrome)。
Unfortunately it does not update the user agent so it is impossible to know if the site will support it. There is a way to change the user agent in Chrome, but it's not something I would expect average users could do. However, here is an answeron the Chrome help forums that explains how for reference.
不幸的是,它不会更新用户代理,因此无法知道该站点是否会支持它。有一种方法可以更改 Chrome 中的用户代理,但这不是我期望普通用户可以做到的。但是,Chrome 帮助论坛上的答案解释了如何参考。
Basically create a shortcut to Chrome and add this command-line parameter to the target.
基本上创建 Chrome 的快捷方式并将此命令行参数添加到目标。
--user-agent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET4.0E"
You might want to make sure you have the current user agent. Here is a sitethat will display it for you. The part you will want to add to the user agent is ".NET CLR 3.5.21022; .NET CLR 3.5.30729;" (of course this might also depend on what is installed on the machine).
您可能想确保您拥有当前的用户代理。这是一个可以为您展示的网站。您要添加到用户代理的部分是“.NET CLR 3.5.21022;.NET CLR 3.5.30729;” (当然,这也可能取决于机器上安装的内容)。
Another downside to this approach is that it does not appear the modified user agent is available in Javascript (I'm still getting the unmodified version).
这种方法的另一个缺点是它似乎没有在 Javascript 中提供修改后的用户代理(我仍然得到未修改的版本)。
------ EDIT------
------编辑------
If you want to know if ClickOnce is available on the client, here is a Javascript function I wrote that will tell you...
如果你想知道 ClickOnce 在客户端是否可用,这里是我写的一个 Javascript 函数,它会告诉你......
this.hasClickOnce = function () {
var userAgent = navigator.userAgent.toUpperCase();
if (userAgent.indexOf('.NET CLR 3.5') >= 0) return true;
if (window.clientInformation && window.clientInformation.plugins) {
// check to see if a ClickOnce extension is installed.
for (var i = 0; i < clientInformation.plugins.length; i++)
if (clientInformation.plugins[i].name == 'ClickOnce plugin for Chrome') return true;
}
return false;
};
回答by fuentesjr
Google Chrome currently doesn't have extensions or an extensions architecture. The extensions architecture is still something they are planning/designingand I imagine won't be available anytime soon. However, there are signsthat Greasemonkey support in Chrome is around the corner. Anyway, some type of Javascript code seems to be your only hope at the moment.
Google Chrome 目前没有扩展程序或扩展程序架构。扩展架构仍然是他们正在规划/设计的东西,我想不会很快可用。然而,有迹象表明 Chrome 中的 Greasemonkey 支持即将到来。无论如何,某种类型的 Javascript 代码似乎是您目前唯一的希望。
回答by Sundar
回答by GamaSharma
We have products that use click once deployment and update that also use single sign-on. Since our customer also wanted to use Chrome we had to search for an alternative.
我们有使用单击一次部署和更新的产品,也使用单点登录。由于我们的客户也想使用 Chrome,我们不得不寻找替代方案。
https://chrome.google.com/webstore/search/clickonce?hl=en-US
https://chrome.google.com/webstore/search/clickonce?hl=zh-CN
There are 3 third party plugins available during the time of writing: - Window Remix ClickOnce - Meta4 ClickOnce - ClickOnce for google
在撰写本文时,有 3 个第三方插件可用: - Window Remix ClickOnce - Meta4 ClickOnce - ClickOnce for google
But these need to be used at own discretion.
但这些需要自行决定使用。
回答by Mohamed Mansour
You can create NPAPI plugin and show your form that way and then communicate to the Extensions frame work from there.
您可以创建 NPAPI 插件并以这种方式显示您的表单,然后从那里与扩展框架进行通信。
回答by Rune Grimstad
Microsoft released a plugin for Firefox some time ago, so they do support alternative browsers. With plugins being written in javascript I suppose it should be possible to look at the source code to determine how it is done and maybe write your own.
微软前段时间为 Firefox 发布了一个插件,所以他们确实支持其他浏览器。插件是用 javascript 编写的,我想应该可以查看源代码来确定它是如何完成的,也许可以编写自己的插件。


