请问怎样创建Internet快捷方式文件,就是收藏夹中的文件?非常感谢!!!!

解决方案 »

  1.   

    添加以下引用: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(); 
      

  2.   

    新建一个文本文件,输入以下内容
    [InternetShortcut]
    URL=http://www.microsoft.com/
    把后缀改为".url",就可以。不知道楼主要的是不是这个方法。