设置可执行文件为内容,在安装部署中添加主输出和内容
在自定义安装类实现调用
也可使用inno setup,installshield实现安装包

解决方案 »

  1.   

    Context.Parameters["targetdir" ]; 路径
      

  2.   

    点击“文件类型编辑器”,找到“应用程序文件夹”,添加->文件,选择你要打包的程序文件(譬如我的程序有run.exe和lib.dll组成),确定。
    你可以参考下http://www.cnblogs.com/lmjob/archive/2009/04/23/1441745.html
      

  3.   

    我的程序有个可执行文件,还需加入另一个可执行文件,如xx.exe~
    我试下
      

  4.   

    Context.Parameters["targetdir" ]; 路径
    这个路径在哪儿设置呢?
      

  5.   

    我估计是你程序的问题。程序如何根据相对路径来定位目标程序的。你安装后看看那个exe文件拷贝到了什么地方。获取程序exe路径的方法很多,可以Google下。
      

  6.   

    如程序是A调B的话,看B程序是否有需要的DLL,或配置文件也打进去了!B的可执行文件也是需要的一些控件需要注删的话,你打包的这个程序也需要把B的控件一起注册了!
      

  7.   

    我所有的DLL文件,和配置文件都加了呀,并且我将安装文件安装后,在C盘的相应安装后的文件的被调用的可执行文件都能单独运行呀!
    不知其解呀!
      

  8.   

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
    System.ComponentModel.Win32Exception: 系统找不到指定的文件。
       at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start()
       at X.XX.toolStripMenuItem2_Click(Object sender, EventArgs e)
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    YocoSEA2007
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files/Setup_test3/X.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    Yoco
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files/Setup_test3/Yoco.DLL
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.For example:<configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
      

  9.   


    你要把*.exe的文件放在BIN文件夹下
    然后再按钮下写代码
     System.Diagnostics.Process.Start("*.exe");
    就可以了,就是你也要把这个文件打包进去就是了。