要通过 lpr 这个要指明详细路径

解决方案 »

  1.   


    已经将路径改为 C:\windows\system32\lpr.exe 现象依旧,双击bat文件可以打印输出,但是通过程序调用 报
    “C:\windows\system32\lpr.exe”不是内部或者外部命令 
      

  2.   

    用cmd /c lpr 试一下
      

  3.   

    Process的参数ProcessStarInfo里,你指定执行bat的时候,还要指定WorkingDirectory,指定为bat所在路径(System.IO.Path.GetDirectoryName(bat文件全路径))
      

  4.   


    已经将路径改为 C:\windows\system32\lpr.exe 现象依旧,双击bat文件可以打印输出,但是通过程序调用 报
    “C:\windows\system32\lpr.exe”不是内部或者外部命令 你是否确认了 C:\windows\system32\lpr.exe 这个外部命令存在、这个详细路径正确?编程不是靠抄的。