this is my scenario: I have an executable file that convert html files to pdf. This exe work only if you start it from its folder. Example: the exe is in C:\HtmlToPdf, so, in the prompt I will do this:
C:\> cd HtmlToPdf
C:\HtmlToPdf> htmltopdf.exe htmlFile pdfFile
So, there is a way to do this in c#? Because I tried this:
FileInfo htmlInfo = new FileInfo(executablePath + @"\" + filename);
var procInfo = new ProcessStartInfo("wkhtmltopdf.exe",htmlInfo.FullName + " " + htmlInfo.FullName.Replace(".html",".pdf"));
procInfo.WorkingDirectory=executablePath;
procInfo.UseShellExecute = false;
Process.Start(procInfo);
But it doesn't work.