Possible Duplicate:
H开发者_如何学运维ow do you create an application shortcut (.lnk file) in C# or .Net
I guys I needed a help on how to create a application shortcut programmaticaly in c#
Try this.
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 is a CodeProject example on the same topic.
精彩评论