如何以编程方式在用户桌面上创建 Web 应用程序快捷方式?

发布于 2024-10-14 08:26:21 字数 406 浏览 4 评论 0原文

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

For enterprise intranet web application, is there any way to create a desktop shortcut of web application on user's desktop? I'm looking for functionality similar to Google Gears, but without installing Google Gears. I'm looking to give user's a link on web application that says "Click here to install desktop shortcut", when they click on it, a desktop shortcut is installed with the custom icon for our application. Is there a way to do it using javascript or any other client side technologies? I don't want to run any exe on user's machines. Even though it's intranet, I have to jump through lot of corporate hoops, compliance approvals, etc to run exe on their machine. We are trying to avoid that, due to time constraints. User machines are windows XP with IE6 installed. They may all upgrade within next year's time to Windows 7 with IE8. Intranet web application in question is developed using asp.net 3.5, c#.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦里泪两行 2024-10-21 08:26:21

如果这确实是企业环境,那么只需与网络运营团队交谈即可。

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

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

If this is really a corporate environment then just go talk to the network operations team.

It should be trivial for them to add something to the login script to push this link to the people's desktops.

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

︶ ̄淡然 2024-10-21 08:26:21

好吧,一开始我认为这是一项不可能完成的任务,直到我意识到事实并非如此。

快捷方式只是一个文件,我们都知道您可以从链接下载文件。

我不确定 Windows 快捷方式在计算机之间的传输效果如何,但我假设具有 http://www.google.com/ 等位置的快捷方式不与任何特定的 Windows 机器。

您可以压缩快捷方式,并将链接指向 zip 文件的位置。告诉用户解压缩文件并放置快捷方式。您也许可以只提供快捷方式,但您必须提供正确的标头,并且可能指定 application/octet-stream 或类似的内容。

或者,您可以告诉他们右键单击,转到new ->;快捷方式,然后将url复制粘贴到location框中。

或者,您可以编写一个批处理文件供用户下载,该文件在默认浏览器中打开一个网址。

我知道它并不像单击按钮 -> 那样直接。收到培根但它会起作用。

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.

情栀口红 2024-10-21 08:26:21

尝试查看 另存为

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

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

Try looking at SaveAs

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

The user will still have to click save and it only saves a HTML page. You would have to open a hidden IFrame containing a web application and call .execCommand on the iframe's document.`

末骤雨初歇 2024-10-21 08:26:21

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

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

You can create a shortcut (.lnk) file in a directory in your site and put it as the Url for a hyperlink so the users right click and save as they download the .lnk file. Your server will need the mime-type .lnk application/x-ms-shortcut adding.

The icon can be done by putting it on a network location and using the "Change icon" function to refer to this network location. This works on Windows. I suppose it could be adapted for each OS required?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文