日期:2014-05-19  浏览次数:20423 次

打包时通过自定义安装生成的 快捷方式 如何在开始-程序中创建
代码如下
string   strVirtualDir=this.Context.Parameters[ "assemblypath "].ToString();
string[]   arrDir=strVirtualDir.Split( '\\ ');
strVirtualDir=arrDir[arrDir.Length-2];
StreamWriter   sw;
string   t   =   "http:// "+System.Net.Dns.GetHostName()+ "/ "+strVirtualDir+ "/ ";

sw   =   new   StreamWriter(File.Open(Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop).ToString()   +   "\\信息管理系统.url ",   FileMode.Create,   FileAccess.Write));

sw.WriteLine( "[InternetShortcut] ");

sw.WriteLine( "URL= "+   t   + " "); sw.WriteLine( "HJ.ico ");

//sw.WriteLine( "IconIndex=1 ");

sw.WriteLine( "Default.asp ");

sw.Flush();

sw.Close();

问题2个
1.创建的快捷方式图标不能更换
2.无法在开始-程序中(Programs)创建文件夹“管理软件”并在其下面创建“快捷方式”

------解决方案--------------------
你在 
  用户的“程序”菜单
下建立你的项目的名称的一个目录,然后添加一个快捷方式就可以了.

------解决方案--------------------

------解决方案--------------------
up
------解决方案--------------------
右键工程主输出,选择新新建快捷方式,然后把这个快捷方式放到开始菜单就可以了。
------解决方案--------------------