Tag: lpr

lpr命令无法在Win 7中使用我的C#程序

我有程序使用’lpr’命令将文件发送到打印机。 我安装了Windows SDK 7.1。 它在32位Windows 7系统中运行良好,但在64位Windows 7中无法运行。 Process proc = new Process(); proc.StartInfo.FileName = “lpr”; proc.StartInfo.WorkingDirectory = GlobalConstants.outBaseDir; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.StartInfo.Arguments = ” -S ” + GlobalConstants.printerIP + ” -P RAW ” + filePath; proc.Start(); 它抛出了一个执行。