Afternoon all,
I am running into a problem with auto printing PDFs from Dynamics SL. The application I have written runs as expected when executed normally ( double clicked ), PDFs are printed, everything is great. When I attempt to run the app from a scheduled task, ROI.exe is erroring out with a FileNotFoundException. Below is my code for the starting of the process ( C# ). The location that I am printing to is a network location... what I can't figure out for the life of me is why it would run perfectly fine one way, and not the other.
//Save the PDF
Process myProcess = new Process();
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.FileName = slDir + "ROI.exe";
myProcess.StartInfo.Arguments = "0 "
+ report.r.report.Trim() + "/run "
+ report.r.report.Trim() + "/format "
+ report.r.whereclause.Trim() + "/where "
+ "0/expformat "
+ @report.r.exportdirectory.Trim() + "Test\\" + pdfFileName + "/expfilename";
myProcess.StartInfo.CreateNoWindow = false;
myProcess.Start();
*This post is locked for comments