5

对于企业内网 Web 应用,有没有办法在用户桌面上创建 Web 应用的桌面快捷方式?我正在寻找类似于 Google Gears 的功能,但没有安装 Google Gears。我希望在 Web 应用程序上为用户提供一个链接,上面写着“单击此处安装桌面快捷方式”,当他们单击它时,会安装一个带有我们应用程序的自定义图标的桌面快捷方式。有没有办法使用 javascript 或任何其他客户端技术来做到这一点?我不想在用户的机器上运行任何 exe。即使它是 Intranet,我也必须跳过许多公司圈子、合规批准等才能在他们的机器上运行 exe。由于时间限制,我们正试图避免这种情况。用户机器是安装了 IE6 的 windows XP。他们可能都在明年的时间内升级到带有 IE8 的 Windows 7。有问题的 Intranet Web 应用程序是使用 asp.net 3.5、c# 开发的。

4

4 回答 4

3

如果这真的是一个公司环境,那么只需与网络运营团队交谈。

对他们来说,在登录脚本中添加一些内容以将此链接推送到人们的桌面应该是微不足道的。

更多信息:
http ://www.petri.co.il/forums/showthread.php?t=
6154 http://social.technet.microsoft.com/Forums/en/winserverGP/thread/02a7bfbb-180f-40eb- 82e3-2343b2bf31eb

于 2011-01-27T19:35:53.863 回答
2

Alright, at first I thought that this was an impossible task, until I realized that it's not.

A shortcut is just a file, and we all know you can download files from links.

I'm not sure how well windows shortcuts can be transferred from computer to computer, but I would assume that a shortcut with a location like http://www.google.com/ is not tied to any specific windows machine.

You could zip the shortcut, and point the link to the location of the zip file. Tell the users to unzip the file and place the shortcut. You may be able to just serve the shortcut, but you'd have to give the right headers, and probably specify application/octet-stream or something like it.

Alternatively you can tell them to right click, go to new -> shortcut, and copy-pasta the url into the location box.

Alternatively you could write a batch file for the users to download that opens a url in the default browser.

I know it's not quite as direct as click-button -> receive bacon but it will work.

于 2011-01-27T19:16:03.947 回答
1

尝试查看另存为

document.execCommand("SaveAs", false, "url to desktop");

用户仍然需要单击保存,它只保存一个 HTML 页面。您必须打开一个包含 Web 应用程序的隐藏 IFrame 并调用.execCommandiframe 的文档。`

于 2011-01-27T19:21:38.140 回答
0

您可以在站点的目录中创建快捷方式 (.lnk) 文件,并将其作为超链接的 Url,以便用户在下载 .lnk 文件时右键单击并保存。您的服务器将需要添加 mime 类型的 .lnk application/x-ms-shortcut。

可以通过将图标放在网络位置并使用“更改图标”功能来引用此网络位置来完成图标。这适用于 Windows。我想它可以适应每个所需的操作系统吗?

于 2012-10-29T16:36:55.617 回答