//添加以下引用
//using System
//using IWshRuntimeLibrary;
private void AddShortcut()
{
string[] vPath = this
string url = //
try
{
string mysite = url;
//創建收藏夾快捷方式
string fav = System
IWshShell_Class wshShell = new IWshShell_ClassClass()
IWshURLShortcut favShortcut = wshShell
favShortcut
favShortcut
//創建桌面快捷方式
string desktop = System
IWshURLShortcut desktopShortcut = wshShell
desktopShortcut
desktopShortcut
}
catch (Exception exc)
{
throw new Exception(
}
}
From:http://tw.wingwit.com/Article/program/net/201311/13551.html