2

Possible Duplicate:
How 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#

0

1 Answer 1

5

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.