C# 创建应用程序快捷方式

C# 创建应用程序快捷方式,c#,C#,可能重复: 伙计们,我需要一个关于如何创建应用程序快捷方式程序的帮助。我用c试试这个 是同一主题的CodeProject示例。谢谢,伙计,这正是我需要的 private static void configStep_addShortcutToStartupGroup() { using (ShellLink shortcut = new ShellLink()) { shortcut.Targe

可能重复:

伙计们,我需要一个关于如何创建应用程序快捷方式程序的帮助。我用c

试试这个


是同一主题的CodeProject示例。

谢谢,伙计,这正是我需要的
  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);
            }
    }