创建应用程序快捷方式
问题描述:
可能重复:
How do you create an application shortcut (.lnk file) in C# or .Net创建应用程序快捷方式
我的家伙,我需要了解如何在C#programmaticaly创建应用程序快捷方式
答
试试这个帮助。
http://vbaccelerator.com/article.asp?id=4301
private static void configStep_addShortcutToStartupGroup()
{
using (ShellLink shortcut = new ShellLink())
{
shortcut.Target = Application.ExecutablePath;
shortcut.WorkingDirectory = Path.GetDirectoryName(Application.ExecutablePath);
shortcut.Description = "My Shorcut Name Here";
shortcut.DisplayMode = ShellLink.LinkDisplayMode.edmNormal;
shortcut.Save(
STARTUP_SHORTCUT_FILEPATH);
}
}
Here是同一主题的一个CodeProject上的例子。
谢谢兄弟,这就是我所需要的 – Krish 2010-09-27 19:16:55