制作安装程序的时候可以指定
好像是在program shortcut
看看msndn的安装文件的帮组吧
好像是在program shortcut
看看msndn的安装文件的帮组吧
解决方案 »
- VS2005 开发 PowerPoint 中PowerPoint.ChartData的问题,COM 组件的调用返回了错误 HRESULT E_FAIL
- 一个c#程序如何控制两个摄像头分别拍照
- C#获取局域网所有IP地址
- 如何设计变更单?
- 向专家求救,windows 访问分区时,都做了些什么?
- 不在Paint事件实现对控件绘制???
- 802.11n无线网络编程用什么,Socket行吗
- C#中如何让自己编写 的类中的错误能被try catch 语句捕获?
- 高分悬赏!几个C#的小问题!
- 关于mail的问题
- 谁可帮我弄一个大专的毕业证,要可在网上查ID的,请不要删此贴,我要找工作!
- 我想让tabpage上面的文字置中啊?
不是要制作安装程序,只是随便找个可以运行的dd,就给它在指定位置建个快捷方式。请教r3000: 是什么api函数??C#方便调用吗?
首先在工程里选择你的打包项目(如setup1)
在目标计算机上的文件系统中选择用户程序文件夹
在用户程序文件夹的右侧窗口中右键单击,选择创建新的快捷方式
在弹出的窗口中选择应用程序文件夹,点击选择‘主输出XXX‘
---->伪君子
------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);
}
}
}
}
有没有别的方法?!
Creating and Modifying Shortcutshttp://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp