[英]Creating a web shortcut on user desktop programmatically
There are quite a few resources for programmatically creating .lnk
type shortcuts to files and programs on the desktop but I'm wondering how to create a shortcut to a web URL. 有很多资源可以在桌面上以编程方式创建.lnk
类型的文件和程序快捷方式,但我想知道如何创建Web URL的快捷方式。
From what I can gather, the web URL shortcut is a text file ending in .URL
and contains a ini-like definition such as: 从我可以收集的内容来看,Web URL快捷方式是以.URL
结尾的文本文件,包含类似ini的定义,例如:
[InternetShortcut]
URL=http://www.google.com/
However, it's not enough to just create the file, it seems you also need to change its meta URL
properties to include the same link. 但是,仅仅创建文件是不够的,似乎您还需要更改其元URL
属性以包含相同的链接。
Any idea how to create these? 知道如何创建这些?
Any sample code from .Net/Perl/batch is welcome. 欢迎来自.Net / Perl / batch的任何示例代码。
You can create .lnk shortcuts to any URI, including web addresses. 您可以为任何URI创建.lnk快捷方式,包括Web地址。 Just create the shortcut and make the target your web address instead of a file location. 只需创建快捷方式,然后将目标设为您的网址而不是文件位置。
See this other question for how to do it programmatically: 有关如何以编程方式执行此操作,请参阅此其他问题:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.