2010-09-27 200 views

回答

5

试试这个帮助。

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上的例子。

相关问题