System.IO.FileNotFoundException;
没有找到你要执行的exe文件,调用的时候写出exe所在的完整路径。

解决方案 »

  1.   

    这不就是找不到你调用的exe文件吗?大哥
      

  2.   

    在。NET的环境下调用是无问题的,但我用的是飞信精简出来的虚拟机。就出这个问题。但以前是用是无问题的。最近这两天不知道为什么才出现这个问题
      

  3.   

     if (setupinput1.Checked == true)
                {
                    String sysFolder = Environment.GetFolderPath(Environment.SpecialFolder.System);
                    // '创建一个新的进程结构
                    ProcessStartInfo pInfo = new ProcessStartInfo();
                    //  '设置其成员FileName为系统资料的Eula.txt
                    pInfo.FileName = Application.StartupPath + @"\tools\jpwb2009.exe";
                    //  '运行该文件
                    Process p = Process.Start(pInfo);
                    //  '等待程序装载完成
                    p.WaitForInputIdle();
                    // '等待进行程退出
                    p.WaitForExit();
                    // '继续执行下面的代码
                    //MessageBox.Show("继续执行代码");
                }我是这样写的,不知道有问题不。我是菜鸟
      

  4.   

    文件我都放在\bin\Debug\下面的
      

  5.   

    不是提示你有文件找不到, System.IO.FileNotFoundException
      

  6.   

    你简单测试一下呗,把pInfo.FileName = Application.StartupPath + @"\tools\jpwb2009.exe"; 改为绝对路径看看有没问题,没有就是这个
      

  7.   

    还是一样。上面说的是不是小了。File name: 'System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 
      at customs.Form1.button1_Click_1(Object sender, EventArgs e) 
      at System.Windows.Forms.Control.OnClick(EventArgs e) 
      at System.Windows.Forms.Button.OnClick(EventArgs e) 
      at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) 
      at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 
      at System.Windows.Forms.Control.WndProc(Message& m) 
      at System.Windows.Forms.ButtonBase.WndProc(Message& m) 
      at System.Windows.Forms.Button.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) 
    还是我调用的。exe
      

  8.   

    pInfo.FileName 
    调试下这个值。。 看看路径下有无那个文件
      

  9.   

    在装有。net的系统上运行调,安装都无问题。我用了飞信精简出来的C#虚拟机上运行,就出玩上面的问题。
      

  10.   

    我估计不是你调用exe的问题,而是这个jpwb2009.exe本身有问题吧
    虚拟机就不懂了。。
      

  11.   

    jpwb2009.exe这个应该无问题,是极品五笔的安装程序