我想在用户程序中添加网站快捷方式:http://www.google.com在窗口表单C#中启动 - >所有程序,我们安装软件设置并安装在用户程序中: -
demo(所有程序中的文件夹)
-demo软件快捷方式
-website链接
提前致谢
答案 0 :(得分:0)
您没有指定创建它的方式或方式。对于完全手动的方式
string fullURLYouWant = "http://www.google.com/";
using (StreamWriter writer = new StreamWriter(yourPath + "\\" + yourShortCutFileName + ".url"))
{
writer.WriteLine("[InternetShortcut]");
writer.WriteLine("URL=" + fullURLYouWant);
writer.WriteLine("IconIndex=0");
writer.WriteLine("IconFile=" + iconFileForYourUrl);
writer.Flush();
}