[求助]请问怎样创建Internet快捷方式文件,就是收藏夹中的文件? 请问怎样创建Internet快捷方式文件,就是收藏夹中的文件?非常感谢!!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 添加以下引用:COM下Windows Script Host Object Model,然后using System.Runtime.InteropServices; using IWshRuntimeLibrary; string mysite = "http://mysite.com"; string fav = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Favorites) + "\\MySite.url";//创建 Windows Script Host Shell 类IWshShell_Class wshShell = new IWshShell_ClassClass(); //定义快捷方式文件IWshURLShortcut shortcut = shell.CreateShortcut(fav) as IWshURLShortcut;shortcut.TargetPath = mysite; //保存快捷方式shortcut.Save(); 新建一个文本文件,输入以下内容[InternetShortcut]URL=http://www.microsoft.com/把后缀改为".url",就可以。不知道楼主要的是不是这个方法。 本地iis服务器使用process.start方法打开htm文件出错 C# 引用第三方DLL实例化后无法为属性附值! 校内网自动登陆问题。。。 推荐几个能实现在C#WinForm上画折线图的东东?? 请教dongdingbaihe大哥。。。 请进教C#中的索引与集合中的迭代器相关 这道题的思路是怎样的??(在线) SQL模糊查询时特殊字符的处理方式总结 VC问题(VC.NET人气不够旺,跑这边来问了) 如何用C#编程获取外部程序的版本信息. 例如获取当前目录下r.dll文件的版本. ???如何用C#实现逐行打印??? 页面刷新的问题
using System.Runtime.InteropServices;
using IWshRuntimeLibrary; string mysite = "http://mysite.com";
string fav = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Favorites) + "\\MySite.url";//创建 Windows Script Host Shell 类
IWshShell_Class wshShell = new IWshShell_ClassClass(); //定义快捷方式文件
IWshURLShortcut shortcut = shell.CreateShortcut(fav) as IWshURLShortcut;
shortcut.TargetPath = mysite; //保存快捷方式
shortcut.Save();
[InternetShortcut]
URL=http://www.microsoft.com/
把后缀改为".url",就可以。不知道楼主要的是不是这个方法。