我有程序使用'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();
Run Code Online (Sandbox Code Playgroud)
它抛出了一个执行.