制作安装程序的时候可以指定
好像是在program shortcut
看看msndn的安装文件的帮组吧

解决方案 »

  1.   

    这是Shell编程,Windows API里有这样的函数。
      

  2.   

    to all:
    不是要制作安装程序,只是随便找个可以运行的dd,就给它在指定位置建个快捷方式。请教r3000: 是什么api函数??C#方便调用吗?
      

  3.   


    首先在工程里选择你的打包项目(如setup1)
    在目标计算机上的文件系统中选择用户程序文件夹
    在用户程序文件夹的右侧窗口中右键单击,选择创建新的快捷方式
    在弹出的窗口中选择应用程序文件夹,点击选择‘主输出XXX‘
      

  4.   

    顶 ---->不同
       ---->伪君子
      

  5.   

    C#创建一个文件的快捷方式 
    ------2002-11-6 14:44:04  您可以使用Interope,在您的项目中引入"Windows Script Host Object Model" COM library。然后运行下面的代码:using System;
    using System.Runtime.InteropServices;
    using IWshRuntimeLibrary;namespace CreateShortcutCOM {
    /// <summary>
    /// This class creates a shortcut with COM interoperability
    /// </summary>
    class ShortcutDemo {
    [STAThread]
    static void Main(string[] args) {
    // Get the app path and filename
    string app = Environment.CurrentDirectory + @"\CreateShortcutCOM.exe";try {
    // Create a Windows Script Host Shell class
    IWshShell_Class shell = new IWshShell_ClassClass();
    // Define the shortcut file
    IWshShortcut_Class shortcut = shell.CreateShortcut(app + ".lnk") as IWshShortcut_Class;
    // Set all its properties
    shortcut.Description = "Smart sample of creating shell shortcut";
    shortcut.TargetPath = app;
    shortcut.IconLocation = app + ",0";
    // Save it
    shortcut.Save();

    catch(COMException ex) {
    Console.WriteLine(ex.Message);
    }
    }
    }
    }
     
      

  6.   

    Windows Script Host ? 被俺叉掉了, 呵呵
    有没有别的方法?!
      

  7.   

    提供参考:
    Creating and Modifying Shortcutshttp://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp
      

  8.   

    我不是要发布程序,只是想用代码实现自定义任意app的快捷方式